private function getArchiveTablesToPurge()
    {
        // get month for which reports as old or older than, should be deleted
        // reports whose creation date <= this month will be deleted
        // (NOTE: we ignore how far we are in the current month)
        $toRemoveDate = Date::factory('today')->subMonth(1 + $this->deleteReportsOlderThan);

        // find all archive tables that are older than N months
        $oldNumericTables = array();
        $oldBlobTables = array();
        foreach (DbHelper::getTablesInstalled() as $table) {
            $type = ArchiveTableCreator::getTypeFromTableName($table);
            if ($type === false) {
                continue;
            }
            $date = ArchiveTableCreator::getDateFromTableName($table);
            list($year, $month) = explode('_', $date);

            if (self::shouldReportBePurged($year, $month, $toRemoveDate)) {
                if ($type == ArchiveTableCreator::NUMERIC_TABLE) {
                    $oldNumericTables[] = $table;
                } else {
                    $oldBlobTables[] = $table;
                }
            }
        }

        return array($oldNumericTables, $oldBlobTables);
    }
private function getArchiveTablesToPurge()
    {
        // get month for which reports as old or older than, should be deleted
        // reports whose creation date <= this month will be deleted
        // (NOTE: we ignore how far we are in the current month)
        $toRemoveDate = Date::factory('today')->subMonth(1 + $this->deleteReportsOlderThan);

        // find all archive tables that are older than N months
        $oldNumericTables = array();
        $oldBlobTables = array();
        foreach (DbHelper::getTablesInstalled() as $table) {
            $type = ArchiveTableCreator::getTypeFromTableName($table);
            if ($type === false) {
                continue;
            }
            $date = ArchiveTableCreator::getDateFromTableName($table);
            list($year, $month) = explode('_', $date);

            if (self::shouldReportBePurged($year, $month, $toRemoveDate)) {
                if ($type == ArchiveTableCreator::NUMERIC_TABLE) {
                    $oldNumericTables[] = $table;
                } else {
                    $oldBlobTables[] = $table;
                }
            }
        }

        return array($oldNumericTables, $oldBlobTables);
    }
private function getArchiveTablesToPurge ( ) { // get month for which reports as old or older than, should be deleted // reports whose creation date <= this month will be deleted // (NOTE: we ignore how far we are in the current month) $ toRemoveDate = Date :: factory ( 'today' ) -> subMonth ( 1 + $ this -> deleteReportsOlderThan ) ; // find all archive tables that are older than N months $ oldNumericTables = array ( ) ; $ oldBlobTables = array ( ) ; foreach ( DbHelper :: getTablesInstalled ( ) as $ table ) { $ type = ArchiveTableCreator :: getTypeFromTableName ( $ table ) ; if ( $ type === false ) { continue ; } $ date = ArchiveTableCreator :: getDateFromTableName ( $ table ) ; list ( $ year , $ month ) = explode ( '_' , $ date ) ; if ( self :: shouldReportBePurged ( $ year , $ month , $ toRemoveDate ) ) { if ( $ type == ArchiveTableCreator :: NUMERIC_TABLE ) { $ oldNumericTables [ ] = $ table ; } else { $ oldBlobTables [ ] = $ table ; } } } return array ( $ oldNumericTables , $ oldBlobTables ) ; }
Utility function that finds every archive table whose reports are considered
old.

@return array An array of two arrays. The first holds the numeric archive table
names, and the second holds the blob archive table names.
Utility function that finds every archive table whose reports are considered old .