You are here

class TestClassMetadataFactory in Plug 7

Hierarchy

Expanded class hierarchy of TestClassMetadataFactory

1 file declares its use of TestClassMetadataFactory
ManagerRegistryTest.php in lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ManagerRegistryTest.php

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php, line 135

Namespace

Doctrine\Tests\Common\Persistence\Mapping
View source
class TestClassMetadataFactory extends AbstractClassMetadataFactory {
  public $driver;
  public $metadata;

  /** @var callable|null */
  public $fallbackCallback;
  public function __construct($driver, $metadata) {
    $this->driver = $driver;
    $this->metadata = $metadata;
  }
  protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents) {
  }
  protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) {
    return __NAMESPACE__ . '\\' . $simpleClassName;
  }
  protected function initialize() {
  }
  protected function newClassMetadataInstance($className) {
    return $this->metadata;
  }
  protected function getDriver() {
    return $this->driver;
  }
  protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService) {
  }
  protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService) {
  }
  protected function isEntity(ClassMetadata $class) {
    return true;
  }
  protected function onNotFoundMetadata($className) {
    if (!($fallback = $this->fallbackCallback)) {
      return null;
    }
    return $fallback();
  }
  public function isTransient($class) {
    return true;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractClassMetadataFactory::$cacheDriver private property
AbstractClassMetadataFactory::$cacheSalt protected property Salt used by specific Object Manager implementation.
AbstractClassMetadataFactory::$initialized protected property
AbstractClassMetadataFactory::$loadedMetadata private property
AbstractClassMetadataFactory::$reflectionService private property
AbstractClassMetadataFactory::getAllMetadata public function Forces the factory to load the metadata of all classes known to the underlying mapping driver. Overrides ClassMetadataFactory::getAllMetadata
AbstractClassMetadataFactory::getCacheDriver public function Gets the cache driver used by the factory to cache ClassMetadata instances.
AbstractClassMetadataFactory::getLoadedMetadata public function Returns an array of all the loaded metadata currently in memory.
AbstractClassMetadataFactory::getMetadataFor public function Gets the class metadata descriptor for a class. Overrides ClassMetadataFactory::getMetadataFor
AbstractClassMetadataFactory::getParentClasses protected function Gets an array of parent classes for the given entity class.
AbstractClassMetadataFactory::getReflectionService public function Gets the reflection service associated with this metadata factory.
AbstractClassMetadataFactory::hasMetadataFor public function Checks whether the factory has the metadata for a class loaded already. Overrides ClassMetadataFactory::hasMetadataFor
AbstractClassMetadataFactory::loadMetadata protected function Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded.
AbstractClassMetadataFactory::setCacheDriver public function Sets the cache driver used by the factory to cache ClassMetadata instances.
AbstractClassMetadataFactory::setMetadataFor public function Sets the metadata descriptor for a specific class. Overrides ClassMetadataFactory::setMetadataFor
AbstractClassMetadataFactory::setReflectionService public function Sets the reflectionService.
TestClassMetadataFactory::$driver public property
TestClassMetadataFactory::$fallbackCallback public property @var callable|null
TestClassMetadataFactory::$metadata public property
TestClassMetadataFactory::doLoadMetadata protected function Actually loads the metadata from the underlying metadata. Overrides AbstractClassMetadataFactory::doLoadMetadata
TestClassMetadataFactory::getDriver protected function Returns the mapping driver implementation. Overrides AbstractClassMetadataFactory::getDriver
TestClassMetadataFactory::getFqcnFromAlias protected function Gets the fully qualified class-name from the namespace alias. Overrides AbstractClassMetadataFactory::getFqcnFromAlias
TestClassMetadataFactory::initialize protected function Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active. Overrides AbstractClassMetadataFactory::initialize
TestClassMetadataFactory::initializeReflection protected function Initializes Reflection after ClassMetadata was constructed. Overrides AbstractClassMetadataFactory::initializeReflection
TestClassMetadataFactory::isEntity protected function Checks whether the class metadata is an entity. Overrides AbstractClassMetadataFactory::isEntity
TestClassMetadataFactory::isTransient public function Returns whether the class with the specified name should have its metadata loaded. This is only the case if it is either mapped directly or as a MappedSuperclass. Overrides AbstractClassMetadataFactory::isTransient
TestClassMetadataFactory::newClassMetadataInstance protected function Creates a new ClassMetadata instance for the given class name. Overrides AbstractClassMetadataFactory::newClassMetadataInstance
TestClassMetadataFactory::onNotFoundMetadata protected function Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions Overrides AbstractClassMetadataFactory::onNotFoundMetadata
TestClassMetadataFactory::wakeupReflection protected function Wakes up reflection after ClassMetadata gets unserialized from cache. Overrides AbstractClassMetadataFactory::wakeupReflection
TestClassMetadataFactory::__construct public function