IXR_Value::__construct
PHP5 constructor.
Method of the class: IXR_Value{}
No Hooks.
Returns
null. Nothing (null).
Usage
$IXR_Value = new IXR_Value(); $IXR_Value->__construct( $data, $type );
- $data(required)
- .
- $type
- .
Default:false
IXR_Value::__construct() IXR Value:: construct code WP 7.0
function __construct( $data, $type = false )
{
$this->data = $data;
if (!$type) {
$type = $this->calculateType();
}
$this->type = $type;
if ($type == 'struct') {
// Turn all the values in the array in to new IXR_Value objects
foreach ($this->data as $key => $value) {
$this->data[$key] = new IXR_Value($value);
}
}
if ($type == 'array') {
for ($i = 0, $j = count($this->data); $i < $j; $i++) {
$this->data[$i] = new IXR_Value($this->data[$i]);
}
}
}