src/ClassGeneration/PropertyCollection.php
public function getByName($propertyName)
    {
        $foundList = new self();
        $list = $this->getIterator();
        foreach ($list as $property) {
            if ((is_array($propertyName) && in_array($property->getName(), $propertyName))
                || ($property->getName() === $propertyName)
            ) {
                $foundList->add($property);
            }
        }

        return $foundList;
    }
public function getByName($propertyName)
    {
        $foundList = new self();
        $list = $this->getIterator();
        foreach ($list as $property) {
            if ((is_array($propertyName) && in_array($property->getName(), $propertyName))
                || ($property->getName() === $propertyName)
            ) {
                $foundList->add($property);
            }
        }

        return $foundList;
    }
public function getByName ( $ propertyName ) { $ foundList = new self ( ) ; $ list = $ this -> getIterator ( ) ; foreach ( $ list as $ property ) { if ( ( is_array ( $ propertyName ) && in_array ( $ property -> getName ( ) , $ propertyName ) ) || ( $ property -> getName ( ) === $ propertyName ) ) { $ foundList -> add ( $ property ) ; } } return $ foundList ; }
Find the properties by name.

@param string $propertyName

@return PropertyCollection
Find the properties by name .