Example #1
0
 /**
  * @param Schema $schema
  * @return array
  */
 public function getNeededModels(Schema $schema)
 {
     $baseRecordClass = $schema->getRecordBaseClass();
     $tableNames = array_merge($schema->getTableNames(), $schema->getViewNames());
     foreach ($tableNames as $key => $tableName) {
         $recordClass = $schema->getRecordClass($tableName);
         if ($recordClass == $baseRecordClass) {
             unset($tableNames[$key]);
         } else {
             $tableNames[$key] = $recordClass;
         }
     }
     return $tableNames;
 }