Goetas\Xsd\XsdToPhp\Php\PhpConverter::visitAttribute PHP Méthode

visitAttribute() private méthode

private visitAttribute ( PHPClass $class, GoetasWebservices\XML\XSDReader\Schema\Schema $schema, GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem $attribute, $arrayize = true )
$class Goetas\Xsd\XsdToPhp\Php\Structure\PHPClass
$schema GoetasWebservices\XML\XSDReader\Schema\Schema
$attribute GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem
    private function visitAttribute(PHPClass $class, Schema $schema, AttributeItem $attribute, $arrayize = true)
    {
        $property = new PHPProperty();
        $property->setName($this->getNamingStrategy()->getPropertyName($attribute));
        if ($arrayize && ($itemOfArray = $this->isArrayType($attribute->getType()))) {
            if ($attribute->getType()->getName()) {
                $arg = new PHPArg($this->getNamingStrategy()->getPropertyName($attribute));
                $arg->setType($this->visitType($itemOfArray));
                $property->setType(new PHPClassOf($arg));
            } else {
                $property->setType($this->visitTypeAnonymous($attribute->getType(), $attribute->getName(), $class));
            }
        } else {
            $property->setType($this->findPHPClass($class, $attribute, true));
        }
        $property->setDoc($attribute->getDoc());
        return $property;
    }