PHP Client for Apache Ignite
|
Public Member Functions | |
__construct () | |
setPhpClassName (?string $phpClassName) | |
getPhpClassName () | |
setIgniteTypeName (?string $typeName) | |
getIgniteTypeName () | |
setFieldType (string $fieldName, $fieldType) | |
getFieldType (string $fieldName) | |
Public Member Functions inherited from Apache\Ignite\Type\ObjectType | |
getTypeCode () | |
Additional Inherited Members | |
Public Attributes inherited from Apache\Ignite\Type\ObjectType | |
const | BYTE = 1 |
const | SHORT = 2 |
const | INTEGER = 3 |
const | LONG = 4 |
const | FLOAT = 5 |
const | DOUBLE = 6 |
const | CHAR = 7 |
const | BOOLEAN = 8 |
const | STRING = 9 |
const | UUID = 10 |
const | DATE = 11 |
const | BYTE_ARRAY = 12 |
const | SHORT_ARRAY = 13 |
const | INTEGER_ARRAY = 14 |
const | LONG_ARRAY = 15 |
const | FLOAT_ARRAY = 16 |
const | DOUBLE_ARRAY = 17 |
const | CHAR_ARRAY = 18 |
const | BOOLEAN_ARRAY = 19 |
const | STRING_ARRAY = 20 |
const | UUID_ARRAY = 21 |
const | DATE_ARRAY = 22 |
const | ENUM = 28 |
const | ENUM_ARRAY = 29 |
const | DECIMAL = 30 |
const | DECIMAL_ARRAY = 31 |
const | TIMESTAMP = 33 |
const | TIMESTAMP_ARRAY = 34 |
const | TIME = 36 |
const | TIME_ARRAY = 37 |
const | OBJECT_ARRAY = 23 |
const | COLLECTION = 24 |
const | MAP = 25 |
const | BINARY_OBJECT = 27 |
const | BINARY_ENUM = 38 |
const | NULL = 101 |
const | COMPLEX_OBJECT = 103 |
Class representing a complex type of Ignite object.
It corresponds to the ObjectType::COMPLEX_OBJECT Ignite type code.
This class may be needed to help Ignite client to:
Note: only public properties of PHP objects can be serialized/deserialized.
Apache\Ignite\Type\ComplexObjectType::__construct | ( | ) |
Public constructor.
Creates a default representation of Ignite complex object type. setPhpClassName(), setIgniteTypeName(), setFieldType() methods may be used to change the default representation.
Apache\Ignite\Type\ComplexObjectType::getFieldType | ( | string | $fieldName | ) |
Gets Ignite type of the indicated field in the complex type.
string | $fieldName | name of the field. |
Apache\Ignite\Type\ComplexObjectType::getIgniteTypeName | ( | ) |
Gets the name of the Ignite complex type.
Apache\Ignite\Type\ComplexObjectType::getPhpClassName | ( | ) |
Gets the name of the PHP class.
Apache\Ignite\Type\ComplexObjectType::setFieldType | ( | string | $fieldName, |
$fieldType | |||
) |
Specifies Ignite type of the indicated field in the complex type.
Affects data writing operations only.
During data serialization Ignite client will assume that the indicated field has the Ignite type specified by this method.
By default (if the type of the field is not specified), Ignite client tries to make automatic mapping between PHP types and Ignite object types - according to the mapping table defined in the description of the ObjectType class.
string | $fieldName | name of the field. |
int | ObjectType | null | $fieldType | Ignite type of the field:
|
ClientException | if error. |
Apache\Ignite\Type\ComplexObjectType::setIgniteTypeName | ( | ?string | $typeName | ) |
Sets the name of the Ignite complex type.
Affects data writing operations only.
The specified name will be used as the Ignite complex type name during the complex object's writing operations.
By default (if the name is not specified), the Ignite complex type name of the serialized complex object is taken from the name of the PHP class which instance is provided in a data writing operation.
string | null | $typeName | name of the Ignite complex type or null (the name is not specified). |
Apache\Ignite\Type\ComplexObjectType::setPhpClassName | ( | ?string | $phpClassName | ) |
Sets the name of the PHP class.
Affects data reading operations only.
The specified name will be used as PHP class name to instantiate a PHP object the received Ignite complex object is deserialized to.
By default (if the name is not specified), the Ignite complex type name of the received complex object is used as PHP class name to instantiate a PHP object during deserialization.
The PHP Class must have a constructor without parameters or with optional parameters only.
string | null | $phpClassName | name of the PHP class or null (the name is not specified). |