getIdentifier() public method

Gets the mapped identifier field of this class.
public getIdentifier ( ) : string
return string $identifier
Ejemplo n.º 1
0
 /**
  * @test
  */
 public function itShouldIdentifyIdentifiers()
 {
     $class = new ClassMetadataInfo('Doctrine\\Tests\\OXM\\Mapping\\Entity');
     $class->mapField(array('fieldName' => 'squibble', 'type' => 'string', 'id' => true));
     $this->assertEquals('squibble', $class->identifier);
     $this->assertEquals('squibble', $class->getIdentifier());
     $this->assertTrue($class->isIdentifier('squibble'));
     $this->assertFalse($class->isIdentifier('not_squibble'));
 }