Doctrine\ODM\PHPCR\Mapping\ClassMetadata::initializeReflection PHP Метод

initializeReflection() публичный Метод

Initializes a new ClassMetadata instance that will hold the object-relational mapping metadata of the class with the given name.
public initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService )
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService
    public function initializeReflection(ReflectionService $reflService)
    {
        $this->reflClass = $reflService->getClass($this->name);
        $this->namespace = $reflService->getClassNamespace($this->name);
    }

Usage Example

Пример #1
0
 public function testClassName()
 {
     $cm = new ClassMetadata("Doctrine\\Tests\\ODM\\PHPCR\\Mapping\\Person");
     $cm->initializeReflection(new RuntimeReflectionService());
     $this->assertEquals("Doctrine\\Tests\\ODM\\PHPCR\\Mapping\\Person", $cm->name);
     $this->assertInstanceOf('ReflectionClass', $cm->reflClass);
     return $cm;
 }
All Usage Examples Of Doctrine\ODM\PHPCR\Mapping\ClassMetadata::initializeReflection
ClassMetadata