Goetas\Xsd\XsdToPhp\Jms\YamlConverter::visitAttribute PHP Method

visitAttribute() private method

private visitAttribute ( &$class, GoetasWebservices\XML\XSDReader\Schema\Schema $schema, GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem $attribute )
$schema GoetasWebservices\XML\XSDReader\Schema\Schema
$attribute GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem
    private function visitAttribute(&$class, Schema $schema, AttributeItem $attribute)
    {
        $property = array();
        $property["expose"] = true;
        $property["access_type"] = "public_method";
        $property["serialized_name"] = $attribute->getName();
        $property["accessor"]["getter"] = "get" . Inflector::classify($attribute->getName());
        $property["accessor"]["setter"] = "set" . Inflector::classify($attribute->getName());
        $property["xml_attribute"] = true;
        if ($alias = $this->getTypeAlias($attribute)) {
            $property["type"] = $alias;
        } elseif ($itemOfArray = $this->isArrayType($attribute->getType())) {
            if ($valueProp = $this->typeHasValue($itemOfArray, $class, 'xx')) {
                $property["type"] = "GoetasWebservices\\Xsd\\XsdToPhp\\Jms\\SimpleListOf<" . $valueProp . ">";
            } else {
                $property["type"] = "GoetasWebservices\\Xsd\\XsdToPhp\\Jms\\SimpleListOf<" . $this->findPHPName($itemOfArray) . ">";
            }
            $property["xml_list"]["inline"] = false;
            $property["xml_list"]["entry_name"] = $itemOfArray->getName();
            if ($schema->getTargetNamespace()) {
                $property["xml_list"]["entry_namespace"] = $schema->getTargetNamespace();
            }
        } else {
            $property["type"] = $this->findPHPClass($class, $attribute);
        }
        return $property;
    }