DMS\Filter\Mapping\ClassMetadataInterface::getClassName PHP Method

getClassName() public method

Get name of class represented in this Metadata object
public getClassName ( ) : string
return string
    public function getClassName();

Usage Example

Example #1
0
 /**
  * Reads annotations for a selected property in the class
  *
  * @param ReflectionProperty $property
  * @param ClassMetadataInterface $metadata
  */
 private function readProperty(ReflectionProperty $property, ClassMetadataInterface $metadata)
 {
     // Skip if this property is not from this class
     if ($property->getDeclaringClass()->getName() != $metadata->getClassName()) {
         return;
     }
     //Iterate over all annotations
     foreach ($this->reader->getPropertyAnnotations($property) as $rule) {
         //Skip is its not a rule
         if (!$rule instanceof Rules\Rule) {
             continue;
         }
         //Add Rule
         $metadata->addPropertyRule($property->getName(), $rule);
     }
 }