Gc\Document\Model::getProperty PHP Method

getProperty() public method

Get property
public getProperty ( string $propertyName ) : false
$propertyName string Property name
return false | PropertyModel
    public function getProperty($propertyName)
    {
        if (!$this->hasData('id')) {
            return false;
        }
        return PropertyModel::fromIdentifier($propertyName, $this->getId());
    }

Usage Example

Example #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetProperty()
 {
     $this->assertFalse($this->object->getProperty('fakeproperty'));
 }