DMS\Filter\Mapping\ClassMetadata::mergeRules PHP Method

mergeRules() public method

{@inheritDoc}
public mergeRules ( DMS\Filter\Mapping\ClassMetadataInterface $metadata )
$metadata DMS\Filter\Mapping\ClassMetadataInterface
    public function mergeRules(ClassMetadataInterface $metadata)
    {
        foreach ($metadata->getFilteredProperties() as $property) {
            foreach ($metadata->getPropertyRules($property) as $rule) {
                $this->addPropertyRule($property, clone $rule);
            }
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Checks if the object has interfaces and cascades parsing of annotatiosn
  * to all the interfaces
  * 
  * @param ClassMetadata $metadata 
  */
 protected function loadInterfaceMetadata($metadata)
 {
     foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) {
         $metadata->mergeRules($this->getClassMetadata($interface->getName()));
     }
 }