Utility/Serialization/JsonObjectSerializer.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\JsonObjectSerializer

Package: Default
Json Serializer to serialize and de serialize.
Parent(s)
\IEntitySerializer
Inherited_from
\IEntitySerializer  

Properties

>VPropertyprivate\ILogger $IDSLogger
The ids logger.
Details
Type
\ILogger
>VPropertyprivatestring $entityName = null
Contains name of class which will be serialized or deserialized
Default valuenullDetails
Type
string
>VPropertyprivate$lastError = null
Default valuenullDetails
Type
n/a

Methods

methodpublicDeserialize( $message,  $limitToOne = FALSE) : \Returns

DeSerializes the specified action entity type.

Parameters
NameTypeDescription
$message
$limitToOne
Returns
TypeDescription
\Returnsthe de serialized object.
methodpublicDeserialize( $message,  $limit = FALSE) : string
inherited

DeSerializes the message to Type T.

Inherited from:
Parameters
NameTypeDescription
$message
$limit
Returns
TypeDescription
stringReturns the deserialized message.
methodpublicSerialize( $entity) : string

Serializes the specified entity.

Parameters
NameTypeDescription
$entity
Returns
TypeDescription
stringReturns the serialize entity in string format.
methodpublicSerialize( $entity) : object
inherited

Serializes the specified entity.

Inherited from:
Parameters
NameTypeDescription
$entity
Returns
TypeDescription
objectReturns the serialize entity in string format.
methodpublic__construct( $idsLogger = NULL) : void

Initializes a new instance of the JsonObjectSerializer class.

Parameters
NameTypeDescription
$idsLogger
methodprivatecheckResult(mixed $result) : mixed

Handle possible errors and react

Parameters
NameTypeDescription
$resultmixed
Returns
TypeDescription
mixed
methodpubliccleanPhpClassNameToIntuitEntityName(string $phpClassName) : string
staticinherited

Clean a POPO class name (like 'IPPClass') to be an IPP v3 Entity name (like 'Class')

Inherited from:
Parameters
NameTypeDescription
$phpClassNamestring

POPO class name

Returns
TypeDescription
stringIntuit Entity name
methodprivatecollectResourceURL(string $entity) : void

Retrivies resoure URL (part of URL path) which extracted from domain model entity name

Parameters
NameTypeDescription
$entitystring
methodprivateconvertObject(\stdClass $object, boolean $limitToOne) : mixed

Converts stdClass objects into object with specified type It tries to learn type from JSON responce

Parameters
NameTypeDescription
$object\stdClass
$limitToOneboolean
Returns
TypeDescription
mixed(stdClass or domain model entity)
methodprivatedecorateIntuitEntityToPhpClassName(\type $intuitEntityName) : \type
static

Creates domain model-like name. In other words it follows naming convetion for SDK TODO make generic and remove duplicates

Parameters
NameTypeDescription
$intuitEntityName\type
Returns
TypeDescription
\type
methodprivategetMessageFromErrorCode(\type $error) : \type

Support json_last_error_msg in PHP 5.2

Parameters
NameTypeDescription
$error\type
Returns
TypeDescription
\type
methodpublicgetResourceURL() : String

Returns path of URL which represent requested resource

Returns
TypeDescription
String
Details
Override
 
methodpublicgetResourceURL() : void
inherited

Returns resource url (basically message type)

Inherited from:
methodprivatesetEntityName(string $name) : void

Sets entity name

Parameters
NameTypeDescription
$namestring
Documentation was generated by phpDocumentor 2.8.5.