Пример #1
0
 public function getTypeName(Type $type)
 {
     $name = $this->classify($type->getName());
     if ($name && substr($name, -4) !== 'Type' && substr($name, -5) !== 'Tipus') {
         $name .= "Type";
     }
     return $name;
 }
Пример #2
0
 public function getTypeName(Type $type)
 {
     $name = Inflector::classify($type->getName());
     if ($name && substr($name, -4) !== 'Type') {
         $name .= "Type";
     }
     return $name;
 }
Пример #3
0
 public function addType(Type $type)
 {
     $this->types[$type->getName()] = $type;
 }
Пример #4
0
 /**
  * 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;
 }
Пример #5
0
 public function getTypeName(Type $type)
 {
     return $this->classify($type->getName()) . "Type";
 }
Пример #6
0
 public function getTypeName(Type $type)
 {
     return Inflector::classify($type->getName()) . "Type";
 }