gossi\codegen\model\parts\PropertiesPart::getProperty PHP 메소드

getProperty() 공개 메소드

Returns a property
public getProperty ( string $nameOrProperty ) : PhpProperty
$nameOrProperty string property name
리턴 gossi\codegen\model\PhpProperty
    public function getProperty($nameOrProperty)
    {
        if ($nameOrProperty instanceof PhpProperty) {
            $nameOrProperty = $nameOrProperty->getName();
        }
        if (!$this->properties->has($nameOrProperty)) {
            throw new \InvalidArgumentException(sprintf('The property "%s" does not exist.', $nameOrProperty));
        }
        return $this->properties->get($nameOrProperty);
    }