PHP Class XmlDeserializer, googleads-php-lib

Afficher le fichier Open project: googleads/googleads-php-lib Class Usage Examples

Méthodes publiques

Méthode Description
ConvertXmlToObject ( string $xml ) : mixed Converts an XML representation to objects of proper classes using many types of information, e.g., the xsi:type attribute.
__construct ( array $classmap ) Creates a new XML deserializer using the specified classmap, which provides information about the hand-written PHP stubs for the types defined outside WSDLs.

Private Methods

Méthode Description
ConvertElementToObject ( DOMElement $element, string $className = null ) : mixed Converts a DOMElement to an object of appropriate class where each child element is converted to be a class property.
ConvertNodeValueToObject ( string $value ) : mixed Converts a node value to a PHP value of the appropriate type.
GetTypeHint ( string $className, string $propertyName ) : null | string Determines the type hint of the specified property of the given class.
GetTypeReflectionClass ( DOMElement $element, string $className = null ) : null | ReflectionClass Gets a relevant RefelectionClass object of the specified DOMElement object.

Method Details

ConvertXmlToObject() public méthode

Converts an XML representation to objects of proper classes using many types of information, e.g., the xsi:type attribute.
public ConvertXmlToObject ( string $xml ) : mixed
$xml string the XML representation to be deserialized
Résultat mixed the converted object

__construct() public méthode

Creates a new XML deserializer using the specified classmap, which provides information about the hand-written PHP stubs for the types defined outside WSDLs.
public __construct ( array $classmap )
$classmap array a mapping from XML tag names and element names in XSD to PHP classes. It helps include the hand-written PHP stubs for the types defined outside WSDLs.