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);
}
}