You are here

public function AbstractClassMetadataFactory::getAllMetadata in Plug 7

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

Return value

array The ClassMetadata instances of all mapped classes.

Overrides ClassMetadataFactory::getAllMetadata

File

lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php, line 106

Class

AbstractClassMetadataFactory
The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping informations of a class which describes how a class should be mapped to a relational database.

Namespace

Doctrine\Common\Persistence\Mapping

Code

public function getAllMetadata() {
  if (!$this->initialized) {
    $this
      ->initialize();
  }
  $driver = $this
    ->getDriver();
  $metadata = array();
  foreach ($driver
    ->getAllClassNames() as $className) {
    $metadata[] = $this
      ->getMetadataFor($className);
  }
  return $metadata;
}