AbstractEntity¶
-
class
Firstred\PostNL\Entity\AbstractEntity¶ - Class Entity.
- Implements
JsonSerializableFirstred\PostNL\Util\XmlSerializable
Summary¶
Methods¶
Properties¶
-
public property
Firstred\PostNL\Entity\AbstractEntity::$defaultProperties¶ - Type
array
-
protected static property
Firstred\PostNL\Entity\AbstractEntity::$id¶ - Type
string
-
protected static property
Firstred\PostNL\Entity\AbstractEntity::$currentService¶ - Type
string
Methods¶
-
public
Firstred\PostNL\Entity\AbstractEntity::__construct()¶ - AbstractEntity constructor.
-
public static
Firstred\PostNL\Entity\AbstractEntity::create( $properties=\[\])¶ - Create an instance of this class without touching the constructor.
- Parameters
$properties (array)
- Returns
object | null
- Since
1.0.0
-
public
Firstred\PostNL\Entity\AbstractEntity::__call($name, $value)¶ - Parameters
$name (string)
$value (mixed)
- Returns
object | null
- Throws
-
public
Firstred\PostNL\Entity\AbstractEntity::jsonSerialize()¶ - Return a serializable array for `json_encode`.
- Returns
array
- Throws
-
public
Firstred\PostNL\Entity\AbstractEntity::xmlSerialize($writer)¶ - Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer)
- Returns
void
- Throws
-
public static
Firstred\PostNL\Entity\AbstractEntity::jsonDeserialize($json)¶ - Deserialize JSON.
- Parameters
$json (
stdClass) JSON object {“EntityName”: object}
- Returns
mixed
- Throws
- Throws
- Throws
- Throws
-
public static
Firstred\PostNL\Entity\AbstractEntity::xmlDeserialize($xml)¶ - Deserialize XML.
- Parameters
$xml (array) Associative array representation of XML response, using Clark notation for namespaces
- Returns
-
public static
Firstred\PostNL\Entity\AbstractEntity::shouldBeAnArray($fqcn, $propertyName)¶ - 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
-
public static
Firstred\PostNL\Entity\AbstractEntity::getFullyQualifiedEntityClassName($shortName)¶ - Get the fully qualified class name for the given entity name.
- Parameters
$shortName (string)
- Returns
string The FQCN
- Throws
- Since
1.2.0