private function visitElementDef(ElementDef $element)
{
if (!isset($this->classes[spl_object_hash($element)])) {
$schema = $element->getSchema();
$class = new PHPClass();
$class->setDoc($element->getDoc());
$class->setName($this->getNamingStrategy()->getItemName($element));
$class->setDoc($element->getDoc());
if (!isset($this->namespaces[$schema->getTargetNamespace()])) {
throw new Exception(sprintf("Can't find a PHP namespace to '%s' namespace", $schema->getTargetNamespace()));
}
$class->setNamespace($this->namespaces[$schema->getTargetNamespace()]);
$this->classes[spl_object_hash($element)]["class"] = $class;
if (!$element->getType()->getName()) {
$this->visitTypeBase($class, $element->getType());
} else {
$this->handleClassExtension($class, $element->getType());
}
}
return $this->classes[spl_object_hash($element)]["class"];
}