|
| __construct ($val=-1, $type='') |
| Build an xmlrpc value.
|
|
| addArray ($values) |
| Add an array of xmlrpc value objects to an xmlrpc value.
|
|
| addScalar ($val, $type='string') |
| Add a single php value to an xmlrpc value.
|
|
| addStruct ($values) |
| Merges an array of named xmlrpc value objects into an xmlrpc value.
|
|
| arraymem ($key) |
| Returns the m-th member of an xmlrpc value of array type.
|
|
| arraysize () |
| Returns the number of members in an xmlrpc value of array type.
|
|
| count () |
| Returns the number of members in an xmlrpc value:
|
|
| getCharsetEncoder () |
|
| getIterator () |
| Implements the IteratorAggregate interface.
|
|
| getLogger () |
|
| kindOf () |
| Returns a string containing either "struct", "array", "scalar" or "undef", describing the base type of the value.
|
|
| offsetExists ($offset) |
|
| offsetGet ($offset) |
|
| offsetSet ($offset, $value) |
|
| offsetUnset ($offset) |
|
| scalartyp () |
| Returns the type of the xmlrpc value.
|
|
| scalarval () |
| Returns the value of a scalar xmlrpc value (base 64 decoding is automatically handled here)
|
|
| serialize ($charsetEncoding='') |
| Returns the xml representation of the value.
|
|
| setCharsetEncoder ($charsetEncoder) |
|
| structeach () |
| Return next member element for xmlrpc values of type struct.
|
|
| structmem ($key) |
| Returns the value of a given struct member (an xmlrpc value object in itself).
|
|
| structmemexists ($key) |
| Checks whether a struct member with a given name is present.
|
|
| structreset () |
| Reset internal pointer for xmlrpc values of type struct.
|
|
| structsize () |
| Returns the number of members in an xmlrpc value of struct type.
|
|
|
static | setLogger ($logger) |
|
|
string null | $_php_class = null |
| $_php_class
|
|
Value[] mixed | $me = array() |
|
int | $mytype = 0 |
| $mytype
|
|
|
static | $xmlrpcArray = "array" |
|
static | $xmlrpcBase64 = "base64" |
|
static | $xmlrpcBoolean = "boolean" |
|
static | $xmlrpcDateTime = "dateTime.iso8601" |
|
static | $xmlrpcDouble = "double" |
|
static | $xmlrpcI4 = "i4" |
|
static | $xmlrpcI8 = "i8" |
|
static | $xmlrpcInt = "int" |
|
static | $xmlrpcNull = "null" |
|
static | $xmlrpcString = "string" |
|
static | $xmlrpcStruct = "struct" |
|
static | $xmlrpcTypes |
|
static | $xmlrpcValue = "undefined" |
|
|
static | $charsetEncoder |
|
static | $logger |
|
◆ __construct()
PhpXmlRpc\Value::__construct |
( |
| $val = -1, |
|
|
| $type = '' ) |
Build an xmlrpc value.
When no value or type is passed in, the value is left uninitialized, and the value can be added later.
- Parameters
-
Value[] | mixed | $val | if passing in an array, all array elements should be PhpXmlRpc\Value themselves |
string | $type | any valid xmlrpc type name (lowercase): i4, int, boolean, string, double, dateTime.iso8601, base64, array, struct, null. If null, 'string' is assumed. You should refer to http://www.xmlrpc.com/spec for more information on what each of these mean. |
◆ addArray()
PhpXmlRpc\Value::addArray |
( |
| $values | ) |
|
Add an array of xmlrpc value objects to an xmlrpc value.
If the xmlrpc value is an array, the elements are appended to the existing ones. If the xmlrpc value is empty (uninitialized), this method makes it an array value, and sets that value. Fails otherwise.
- Parameters
-
- Return values
-
- Todo
- add some checking for $values to be an array of xmlrpc values?
◆ addScalar()
PhpXmlRpc\Value::addScalar |
( |
| $val, |
|
|
| $type = 'string' ) |
Add a single php value to an xmlrpc value.
If the xmlrpc value is an array, the php value is added as its last element. If the xmlrpc value is empty (uninitialized), this method makes it a scalar value, and sets that value. Fails if the xmlrpc value is not an array and already initialized.
- Parameters
-
mixed | $val | |
string | $type | allowed values: i4, i8, int, boolean, string, double, dateTime.iso8601, base64, null. |
- Return values
-
◆ addStruct()
PhpXmlRpc\Value::addStruct |
( |
| $values | ) |
|
Merges an array of named xmlrpc value objects into an xmlrpc value.
If the xmlrpc value is a struct, the elements are merged with the existing ones (overwriting existing ones). If the xmlrpc value is empty (uninitialized), this method makes it a struct value, and sets that value. Fails otherwise.
- Parameters
-
- Return values
-
- Todo
- add some checking for $values to be an array?
◆ arraymem()
PhpXmlRpc\Value::arraymem |
( |
| $key | ) |
|
Returns the m-th member of an xmlrpc value of array type.
- Parameters
-
integer | $key | the index of the value to be retrieved (zero based) |
- Return values
-
- Deprecated
- use array access, e.g. $val[$key]
◆ arraysize()
PhpXmlRpc\Value::arraysize |
( |
| ) |
|
Returns the number of members in an xmlrpc value of array type.
- Return values
-
- Deprecated
- use count() instead
◆ count()
PhpXmlRpc\Value::count |
( |
| ) |
|
Returns the number of members in an xmlrpc value:
- 0 for uninitialized values
- 1 for scalar values
- the number of elements for struct and array values
- Return values
-
◆ getIterator()
PhpXmlRpc\Value::getIterator |
( |
| ) |
|
Implements the IteratorAggregate interface.
- Return values
-
◆ kindOf()
PhpXmlRpc\Value::kindOf |
( |
| ) |
|
Returns a string containing either "struct", "array", "scalar" or "undef", describing the base type of the value.
- Return values
-
◆ scalartyp()
PhpXmlRpc\Value::scalartyp |
( |
| ) |
|
Returns the type of the xmlrpc value.
For integers, 'int' is always returned in place of 'i4'. 'i8' is considered a separate type and returned as such
- Return values
-
◆ scalarval()
PhpXmlRpc\Value::scalarval |
( |
| ) |
|
Returns the value of a scalar xmlrpc value (base 64 decoding is automatically handled here)
- Return values
-
◆ serialize()
PhpXmlRpc\Value::serialize |
( |
| $charsetEncoding = '' | ) |
|
Returns the xml representation of the value.
XML prologue not included.
- Parameters
-
string | $charsetEncoding | the charset to be used for serialization. if null, US-ASCII is assumed |
- Return values
-
◆ serializedata()
PhpXmlRpc\Value::serializedata |
( |
| $typ, |
|
|
| $val, |
|
|
| $charsetEncoding = '' ) |
|
protected |
- Parameters
-
string | $typ | |
Value[] | mixed | $val | |
string | $charsetEncoding | |
- Return values
-
◆ structeach()
PhpXmlRpc\Value::structeach |
( |
| ) |
|
Return next member element for xmlrpc values of type struct.
- Return values
-
- Exceptions
-
Error | starting with php 8.0, this function should not be used, as it will always throw |
- Deprecated
- iterate directly over the object using foreach instead
◆ structmem()
PhpXmlRpc\Value::structmem |
( |
| $key | ) |
|
Returns the value of a given struct member (an xmlrpc value object in itself).
Will raise a php warning if struct member of given name does not exist.
- Parameters
-
string | $key | the name of the struct member to be looked up |
- Return values
-
- Deprecated
- use array access, e.g. $val[$key]
◆ structmemexists()
PhpXmlRpc\Value::structmemexists |
( |
| $key | ) |
|
Checks whether a struct member with a given name is present.
Works only on xmlrpc values of type struct.
- Parameters
-
string | $key | the name of the struct member to be looked up |
- Return values
-
- Deprecated
- use array access, e.g. isset($val[$key])
◆ structreset()
PhpXmlRpc\Value::structreset |
( |
| ) |
|
Reset internal pointer for xmlrpc values of type struct.
- Deprecated
- iterate directly over the object using foreach instead
◆ structsize()
PhpXmlRpc\Value::structsize |
( |
| ) |
|
Returns the number of members in an xmlrpc value of struct type.
- Return values
-
- Deprecated
- use count() instead
◆ $me
Value [] mixed PhpXmlRpc\Value::$me = array() |
- Todo
- : do these need to be public?
◆ $xmlrpcTypes
PhpXmlRpc\Value::$xmlrpcTypes |
|
static |
Initial value:
"i4" => 1,
"i8" => 1,
"int" => 1,
"boolean" => 1,
"double" => 1,
"string" => 1,
"dateTime.iso8601" => 1,
"base64" => 1,
"array" => 2,
"struct" => 3,
"null" => 1,
)
The documentation for this class was generated from the following file: