PHP Class Pingpp\Util\Util

Show file Open project: pingplusplus/pingpp-php Class Usage Examples

Public Methods

Method Description
convertPingppObjectToArray ( array $values, $keep_object = false ) : array Recursively converts the PHP Pingpp object to an array.
convertPingppObjectToStdObject ( array $values ) : array Recursively converts the PHP Pingpp object to an stdObject.
convertToPingppObject ( stdObject $resp, array $opts ) : PingppObject | array Converts a response from the Pingpp API to the corresponding PHP object.
getRequestHeaders ( )
isList ( array | mixed $array ) : boolean Whether the provided array (or other) is a list rather than a dictionary.
utf8 ( string | mixed $value )

Method Details

convertPingppObjectToArray() public static method

Recursively converts the PHP Pingpp object to an array.
public static convertPingppObjectToArray ( array $values, $keep_object = false ) : array
$values array The PHP Pingpp object to convert.
return array

convertPingppObjectToStdObject() public static method

Recursively converts the PHP Pingpp object to an stdObject.
public static convertPingppObjectToStdObject ( array $values ) : array
$values array The PHP Pingpp object to convert.
return array

convertToPingppObject() public static method

Converts a response from the Pingpp API to the corresponding PHP object.
public static convertToPingppObject ( stdObject $resp, array $opts ) : PingppObject | array
$resp stdObject The response from the Pingpp API.
$opts array
return Pingpp\PingppObject | array

getRequestHeaders() public static method

public static getRequestHeaders ( )

isList() public static method

Whether the provided array (or other) is a list rather than a dictionary.
public static isList ( array | mixed $array ) : boolean
$array array | mixed
return boolean True if the given object is a list.

utf8() public static method

public static utf8 ( string | mixed $value )
$value string | mixed A string to UTF8-encode.