PHP Class Stripe\Util\Util

Show file Open project: stripe/stripe-php Class Usage Examples

Public Methods

Method Description
convertStripeObjectToArray ( array $values ) : array Recursively converts the PHP Stripe object to an array.
convertToStripeObject ( array $resp, array $opts ) : Stripe\StripeObject | array Converts a response from the Stripe API to the corresponding PHP object.
isList ( array | mixed $array ) : boolean Whether the provided array (or other) is a list rather than a dictionary.
utf8 ( string | mixed $value ) : string | mixed

Method Details

convertStripeObjectToArray() public static method

Recursively converts the PHP Stripe object to an array.
public static convertStripeObjectToArray ( array $values ) : array
$values array The PHP Stripe object to convert.
return array

convertToStripeObject() public static method

Converts a response from the Stripe API to the corresponding PHP object.
public static convertToStripeObject ( array $resp, array $opts ) : Stripe\StripeObject | array
$resp array The response from the Stripe API.
$opts array
return Stripe\StripeObject | array

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 ) : string | mixed
$value string | mixed A string to UTF8-encode.
return string | mixed The UTF8-encoded string, or the object passed in if it wasn't a string.