IXR_Value::calculateType()publicWP 1.0

Метод класса: IXR_Value{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$IXR_Value = new IXR_Value();
$IXR_Value->calculateType();

Код IXR_Value::calculateType() WP 6.5.2

function calculateType()
{
    if ($this->data === true || $this->data === false) {
        return 'boolean';
    }
    if (is_integer($this->data)) {
        return 'int';
    }
    if (is_double($this->data)) {
        return 'double';
    }

    // Deal with IXR object types base64 and date
    if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
        return 'date';
    }
    if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
        return 'base64';
    }

    // If it is a normal PHP object convert it in to a struct
    if (is_object($this->data)) {
        $this->data = get_object_vars($this->data);
        return 'struct';
    }
    if (!is_array($this->data)) {
        return 'string';
    }

    // We have an array - is it an array or a struct?
    if ($this->isStruct($this->data)) {
        return 'struct';
    } else {
        return 'array';
    }
}