public function check( IdStack $idPath ) { $classAttributes = $idPath->getClassAttributes()->filterClassAttributesOnLevelAndType( $this->levelDefinedMeaningName, $this->annotationType ); $classAttributes = $this->attributeIDFilter->filter( $classAttributes ); return count( $classAttributes ) > 0; }
protected function determineAttributeId( IdStack $idPath, $annotationType, $attributeIdFromRecord ) { $result = $attributeIdFromRecord; if ( $this->attributeIDFilter->leavesOnlyOneOption() ) { $classAttributes = $idPath->getClassAttributes()->filterClassAttributesOnLevelAndType( $this->levelName, $annotationType ); $classAttributes = $this->attributeIDFilter->filter( $classAttributes ); if ( count( $classAttributes ) == 1 ) { $result = $classAttributes[0]; } } return $result; }