public function hasProperty($name)
    {
        if (null !== $name) {
            $n = (string) $name;
            foreach ($this->properties as $property) {
                if ($property->getName() === $n) {
                    return true;
                }
            }
        }

        return false;
    }