hasProperty() public method

checks if a property exists.
public hasProperty ( string $name ) : boolean
$name string
return boolean
示例#1
0
 /**
  * {@inheritdoc}
  */
 public function copyFrom(StructureInterface $structure)
 {
     foreach ($this->getProperties(true) as $property) {
         if ($structure->hasProperty($property->getName())) {
             $property->setValue($structure->getPropertyValue($property->getName()));
         }
     }
     $this->setDocument($structure->getDocument());
 }