Goetas\Xsd\XsdToPhp\AbstractConverter::getTypeAlias PHP Method

getTypeAlias() public method

public getTypeAlias ( $type, GoetasWebservices\XML\XSDReader\Schema\Schema $schemapos = null )
$schemapos GoetasWebservices\XML\XSDReader\Schema\Schema
    public function getTypeAlias($type, Schema $schemapos = null)
    {
        $schema = $schemapos ?: $type->getSchema();
        $cid = $schema->getTargetNamespace() . "|" . $type->getName();
        if (isset($this->aliasCache[$cid])) {
            return $this->aliasCache[$cid];
        }
        if (isset($this->typeAliases[$schema->getTargetNamespace()][$type->getName()])) {
            return $this->aliasCache[$cid] = call_user_func($this->typeAliases[$schema->getTargetNamespace()][$type->getName()], $type);
        }
    }