public function getTypeName(Type $type) { $name = $this->classify($type->getName()); if ($name && substr($name, -4) !== 'Type' && substr($name, -5) !== 'Tipus') { $name .= "Type"; } return $name; }
public function getTypeName(Type $type) { $name = Inflector::classify($type->getName()); if ($name && substr($name, -4) !== 'Type') { $name .= "Type"; } return $name; }
public function addType(Type $type) { $this->types[$type->getName()] = $type; }
/** * Determine the fully qualified name of a type from the XMLSchema * * @param \Goetas\XML\XSDReader\Schema\Type\Type|\Sapone\Util\SimpleXMLElement $type * @return string */ public function inflectQualifiedName(Type $type) { $name = $this->extractArrayType($type->getName()); // if the given type is a XSD primitive type if ($type->getSchema()->getTargetNamespace() === SchemaReader::XSD_NS) { // convert to the corresponding PHP type $qualifiedName = $this->convertXsdTypeToPhpType($name); } else { // preprend the namespace $namespace = $this->inflectNamespace($type); $qualifiedName = ($namespace ? $namespace . '\\' : '') . $name; } return $qualifiedName; }
public function getTypeName(Type $type) { return $this->classify($type->getName()) . "Type"; }
public function getTypeName(Type $type) { return Inflector::classify($type->getName()) . "Type"; }