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

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

Checks whether the class will generate an id via the repository.
public isIdGeneratorRepository ( ) : boolean
Результат boolean TRUE if the class uses the Repository generator, FALSE otherwise.
    public function isIdGeneratorRepository()
    {
        return $this->idGenerator === self::GENERATOR_TYPE_REPOSITORY;
    }

Usage Example

 /**
  * @depends testLoadRepositoryMapping
  * @param ClassMetadata $class
  */
 public function testRepositoryMapping($class)
 {
     $this->assertEquals('Doctrine\\Tests\\ODM\\PHPCR\\Mapping\\Model\\DocumentRepository', $class->customRepositoryClassName);
     $this->assertTrue($class->isIdGeneratorRepository());
 }
ClassMetadata