You are here

function XMLSchema::addSimpleType in Salesforce Suite 5

Same name in this branch
  1. 5 includes/nusoap.php \XMLSchema::addSimpleType()
  2. 5 includes/nusoap.orig.php \XMLSchema::addSimpleType()
Same name and namespace in other branches
  1. 5.2 includes/nusoap.php \XMLSchema::addSimpleType()
  2. 5.2 includes/nusoap.orig.php \XMLSchema::addSimpleType()

* adds a simple type to the schema * *

Parameters

string $name: * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param string $typeClass (should always be simpleType) * @param string $phpType (should always be scalar) * @param array $enumeration array of values * @access public * @see xmlschema * @see getTypeDef

File

includes/nusoap.php, line 1857

Class

XMLSchema
parses an XML Schema, allows access to it's data, other utility methods no validation... yet. very experimental and limited. As is discussed on XML-DEV, I'm one of the people that just doesn't have time to read the spec(s) thoroughly,…

Code

function addSimpleType($name, $restrictionBase = '', $typeClass = 'simpleType', $phpType = 'scalar', $enumeration = []) {
  $this->simpleTypes[$name] = array(
    'name' => $name,
    'typeClass' => $typeClass,
    'phpType' => $phpType,
    'type' => $restrictionBase,
    'enumeration' => $enumeration,
  );
  $this
    ->xdebug("addSimpleType {$name}:");
  $this
    ->appendDebug($this
    ->varDump($this->simpleTypes[$name]));
}