PHP Class PayPal\Core\PPUtils

Afficher le fichier Open project: paypal/sdk-core-php Class Usage Examples

Méthodes publiques

Méthode Description
array_match_key ( array $map, string $key ) : boolean Returns true if the array contains a key like $key
escapeInvalidXmlCharsRegex ( $textContent ) : string Escapes invalid xml characters
filterKeyPrefix ( array $map, string $keyPrefix ) : array Filter an array based on keys that match given prefix
getLocalIPAddress ( ) Get the local IP address. The client address is a required request parameter for some API calls
isAttributeProperty ( string $class, string $propertyName ) : string Determine if a property in a given class is a attribute type.
isIPv4 ( $ip ) : boolean Determines if valid IPv4 or not
isPropertyArray ( string $class, string $propertyName ) : string Determine if a property in a given class is a collection type.
lowerKeys ( array $array ) : array Convert all array keys to lowercase
nvpToMap ( string $nvpString ) : array Convert a Name Value Pair (NVP) formatted string into an associative array taking care to urldecode array values
objectProperties ( object $object ) : array
propertyAnnotations ( string $class, string $propertyName ) : string Get property annotations for a certain property in a class
propertyType ( string $class, string $propertyName ) : string Get data type of a property in a given class
xmlToArray ( string $xmlInput ) Convert xml string to an intermediate nested array representation that can be iterated

Private Methods

Méthode Description
xmlNodeToArray ( DOMNode $node ) Convert a DOM node to an intermediate nested array representation that can be iterated

Method Details

array_match_key() public static méthode

Returns true if the array contains a key like $key
public static array_match_key ( array $map, string $key ) : boolean
$map array
$key string
Résultat boolean

escapeInvalidXmlCharsRegex() public static méthode

Escapes invalid xml characters
public static escapeInvalidXmlCharsRegex ( $textContent ) : string
$textContent = xml data to be escaped
Résultat string

filterKeyPrefix() public static méthode

Filter an array based on keys that match given prefix
public static filterKeyPrefix ( array $map, string $keyPrefix ) : array
$map array
$keyPrefix string
Résultat array

getLocalIPAddress() public static méthode

Get the local IP address. The client address is a required request parameter for some API calls
public static getLocalIPAddress ( )

isAttributeProperty() public static méthode

Determine if a property in a given class is a attribute type.
public static isAttributeProperty ( string $class, string $propertyName ) : string
$class string
$propertyName string
Résultat string

isIPv4() public static méthode

Determines if valid IPv4 or not
public static isIPv4 ( $ip ) : boolean
$ip
Résultat boolean

isPropertyArray() public static méthode

Determine if a property in a given class is a collection type.
public static isPropertyArray ( string $class, string $propertyName ) : string
$class string
$propertyName string
Résultat string

lowerKeys() public static méthode

Convert all array keys to lowercase
public static lowerKeys ( array $array ) : array
$array array
Résultat array

nvpToMap() public static méthode

Convert a Name Value Pair (NVP) formatted string into an associative array taking care to urldecode array values
public static nvpToMap ( string $nvpString ) : array
$nvpString string
Résultat array

objectProperties() public static méthode

public static objectProperties ( object $object ) : array
$object object
Résultat array

propertyAnnotations() public static méthode

Get property annotations for a certain property in a class
public static propertyAnnotations ( string $class, string $propertyName ) : string
$class string
$propertyName string
Résultat string

propertyType() public static méthode

Get data type of a property in a given class
public static propertyType ( string $class, string $propertyName ) : string
$class string
$propertyName string
Résultat string

xmlToArray() public static méthode

Convert xml string to an intermediate nested array representation that can be iterated
public static xmlToArray ( string $xmlInput )
$xmlInput string XML string to convert