__construct() public method

Main constructor
public __construct ( Generator $generator, string $name )
$generator WsdlToPhp\PackageGenerator\Generator\Generator
$name string the original name
 /**
  * Main constructor
  * @see AbstractModel::__construct()
  * @uses StructAttribute::setType()
  * @uses AbstractModel::setOwner()
  * @param Generator $generator
  * @param string $name the original name
  * @param string $type the type
  * @param Struct $struct defines the struct which owns this value
  */
 public function __construct(Generator $generator, $name, $type, Struct $struct)
 {
     parent::__construct($generator, $name);
     $this->setType($type)->setOwner($struct);
 }
示例#2
0
 /**
  * Main constructor
  * @see AbstractModel::__construct()
  * @uses Service::setMethods()
  * @param Generator $generator
  * @param string $name the service name
  */
 public function __construct(Generator $generator, $name)
 {
     parent::__construct($generator, $name);
     $this->setMethods(new MethodContainer($generator));
 }
示例#3
0
 /**
  * Main constructor
  * @see AbstractModel::__construct()
  * @uses AbstractModel::setOwner()
  * @uses StructValue::setIndex()
  * @param Generator $generator
  * @param string $name the original name
  * @param string $index the index of the value in the enumeration struct
  * @param Struct $struct defines the struct which owns this value
  */
 public function __construct(Generator $generator, $name, $index, Struct $struct)
 {
     parent::__construct($generator, $name);
     $this->setIndex($index);
     $this->setOwner($struct);
 }
示例#4
0
 /**
  * Main constructor
  * @see AbstractModel::__construct()
  * @uses Method::setParameterType()
  * @uses Method::setReturnType()
  * @uses AbstractModel::setOwner()
  * @param Generator $generator
  * @param string $name the function name
  * @param string|array $parameterType the type/name of the parameter
  * @param string|array $returnType the type/name of the return value
  * @param Service $service defines the struct which owns this value
  * @param bool $isUnique defines if the method is unique or not
  */
 public function __construct(Generator $generator, $name, $parameterType, $returnType, Service $service, $isUnique = true)
 {
     parent::__construct($generator, $name);
     $this->setParameterType($parameterType)->setReturnType($returnType)->setIsUnique($isUnique)->setOwner($service);
 }
示例#5
0
 /**
  * Main constructor
  * @see AbstractModel::__construct()
  * @uses Struct::setIsStruct()
  * @param Generator $generator
  * @param string $name the original name
  * @param bool $isStruct defines if it's a real sruct or not
  * @param bool $isRestriction defines if it's an enumeration or not
  */
 public function __construct(Generator $generator, $name, $isStruct = true, $isRestriction = false)
 {
     parent::__construct($generator, $name);
     $this->setIsStruct($isStruct)->setIsRestriction($isRestriction)->setAttributes(new StructAttributeContainer($generator))->setValues(new StructValueContainer($generator));
 }
 /**
  * @param Generator $generator
  * @param string $name
  */
 public function __construct(Generator $generator, $name, $content)
 {
     parent::__construct($generator, $name);
     $this->setContent($content);
 }