public function getIdentifier() { if (($annotation = $this->getAnnotationByType('Resource')) && isset($annotation->identifier)) { return $annotation->identifier; } return $this->identifier; }