.. rst-class:: phpdoctorst .. role:: php(code) :language: php AbstractEntity ============== .. php:namespace:: Firstred\PostNL\Entity .. rst-class:: abstract .. php:class:: AbstractEntity .. rst-class:: phpdoc-description | Class Entity\. :Implements: :php:interface:`JsonSerializable` :php:interface:`Firstred\\PostNL\\Util\\XmlSerializable` Summary ------- Methods ~~~~~~~ * :php:meth:`public \_\_construct\(\)` * :php:meth:`public static create\($properties\)` * :php:meth:`public \_\_call\($name, $value\)` * :php:meth:`public jsonSerialize\(\)` * :php:meth:`public xmlSerialize\($writer\)` * :php:meth:`public static jsonDeserialize\($json\)` * :php:meth:`public static xmlDeserialize\($xml\)` * :php:meth:`public static shouldBeAnArray\($fqcn, $propertyName\)` * :php:meth:`public static getFullyQualifiedEntityClassName\($shortName\)` Properties ---------- .. php:attr:: public defaultProperties :Type: array .. php:attr:: protected static id :Type: string .. php:attr:: protected static currentService :Type: string Methods ------- .. rst-class:: public .. php:method:: public __construct() .. rst-class:: phpdoc-description | AbstractEntity constructor\. .. rst-class:: public static deprecated .. php:method:: public static create( $properties=\[\]) .. rst-class:: phpdoc-description | Create an instance of this class without touching the constructor\. :Parameters: * **$properties** (array) :Returns: static :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Since: 1.0.0 :Deprecated: 1.4.0 Use the constructor instead with named arguments .. rst-class:: public .. php:method:: public __call( $name, $value) :Parameters: * **$name** (string) * **$value** (mixed) :Returns: object | null :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` .. rst-class:: public .. php:method:: public jsonSerialize() .. rst-class:: phpdoc-description | Return a serializable array for \`json\_encode\`\. :Returns: array :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` .. rst-class:: public .. php:method:: public xmlSerialize( $writer) .. rst-class:: phpdoc-description | Return a serializable array for the XMLWriter\. :Parameters: * **$writer** (:any:`Sabre\\Xml\\Writer `) :Returns: void :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` .. rst-class:: public static .. php:method:: public static jsonDeserialize( $json) .. rst-class:: phpdoc-description | Deserialize JSON\. :Parameters: * **$json** (:any:`stdClass `) JSON object `{"EntityName": object}` :Returns: static :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` .. rst-class:: public static .. php:method:: public static xmlDeserialize( $xml) .. rst-class:: phpdoc-description | Deserialize XML\. :Parameters: * **$xml** (array) Associative array representation of XML response, using Clark notation for namespaces :Returns: :any:`\\Firstred\\PostNL\\Entity\\AbstractEntity ` .. rst-class:: public static deprecated .. php:method:: public static shouldBeAnArray( $fqcn, $propertyName) .. rst-class:: phpdoc-description | Whether the given property should bbe an array :Parameters: * **$fqcn** (string) * **$propertyName** (string) :Returns: false | string If found, singular name of property :Since: 1.2.0 :Deprecated: 1.4.1 .. rst-class:: public static deprecated .. php:method:: public static getFullyQualifiedEntityClassName( $shortName) .. rst-class:: phpdoc-description | Get the fully qualified class name for the given entity name\. :Parameters: * **$shortName** (string) :Returns: string The FQCN :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Since: 1.2.0 :Deprecated: 1.4.1