public function getPropertyByName($name)
    {
        foreach ($this->properties as $property) {
            if ($property->getName() == $name) {
                return $property;
            }
        }

        throw new \InvalidArgumentException(sprintf('The property "%s" does not exists.', $name));
    }
public function getPropertyByName($name)
    {
        foreach ($this->properties as $property) {
            if ($property->getName() == $name) {
                return $property;
            }
        }

        throw new \InvalidArgumentException(sprintf('The property "%s" does not exists.', $name));
    }
public function getPropertyByName ( $ name ) { foreach ( $ this -> properties as $ property ) { if ( $ property -> getName ( ) == $ name ) { return $ property ; } } throw new \ InvalidArgumentException ( sprintf ( 'The property "%s" does not exists.' , $ name ) ) ; }
Returns a property by name.

@param string $name The property name.

@return Mandango\Mondator\Definition\Property The property.

@throws \InvalidArgumentException If the property does not exists.

@api
Returns a property by name .