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));
    }