PHP 클래스 Braintree\Util

파일 보기 프로젝트 열기: braintree/braintree_php 1 사용 예제들

공개 메소드들

메소드 설명
attributesToString ( $attributes )
buildClassName ( string $name ) : string
camelCaseToDelimiter ( string $string, null | string $delimiter = '-' ) : string find capitals and convert to delimiter + lowercase
camelCaseToDelimiterArray ( $array, $delimiter = '-' )
cleanClassName ( string $name ) : camelCased removes the header from a classname
delimiterToCamelCase ( string $string, null | string $delimiter = '[\-\_]' ) : string convert alpha-beta-gamma to alphaBetaGamma
delimiterToCamelCaseArray ( $array, $delimiter = '[\-\_]' )
delimiterToUnderscore ( string $string ) : string convert alpha-beta-gamma to alpha_beta_gamma
delimiterToUnderscoreArray ( $array )
extractAttributeAsArray ( array &$attribArray, string $attributeName ) : array extracts an attribute and returns an array of objects
implodeAssociativeArray ( array $array, string $separator = '=', string $glue = ', ' ) : boolean
returnObjectOrThrowException ( string $className, object $resultObj ) : object
throwStatusCodeException ( string $statusCode, null | string $message = null ) : void throws an exception based on the type of error
verifyKeys ( array $signature, array $attributes ) verify user request structure

비공개 메소드들

메소드 설명
_flattenArray ( array $keys, string $namespace = null ) : array flattens a numerically indexed nested array to a single level
_flattenUserKeys ( $keys, $namespace = null )
_removeWildcardKeys ( array $validKeys, $invalidKeys ) : array removes wildcard entries from the invalid keys array

메소드 상세

attributesToString() 공개 정적인 메소드

public static attributesToString ( $attributes )

buildClassName() 공개 정적인 메소드

public static buildClassName ( string $name ) : string
$name string className
리턴 string ClassName

camelCaseToDelimiter() 공개 정적인 메소드

find capitals and convert to delimiter + lowercase
public static camelCaseToDelimiter ( string $string, null | string $delimiter = '-' ) : string
$string string
$delimiter null | string
리턴 string modified string

camelCaseToDelimiterArray() 공개 정적인 메소드

public static camelCaseToDelimiterArray ( $array, $delimiter = '-' )

cleanClassName() 공개 정적인 메소드

removes the header from a classname
public static cleanClassName ( string $name ) : camelCased
$name string ClassName
리턴 camelCased classname minus header

delimiterToCamelCase() 공개 정적인 메소드

convert alpha-beta-gamma to alphaBetaGamma
public static delimiterToCamelCase ( string $string, null | string $delimiter = '[\-\_]' ) : string
$string string
$delimiter null | string
리턴 string modified string

delimiterToCamelCaseArray() 공개 정적인 메소드

public static delimiterToCamelCaseArray ( $array, $delimiter = '[\-\_]' )

delimiterToUnderscore() 공개 정적인 메소드

convert alpha-beta-gamma to alpha_beta_gamma
public static delimiterToUnderscore ( string $string ) : string
$string string
리턴 string modified string

delimiterToUnderscoreArray() 공개 정적인 메소드

public static delimiterToUnderscoreArray ( $array )

extractAttributeAsArray() 공개 정적인 메소드

extracts the requested element from an array, and converts the contents of its child arrays to objects of type $attributeName, or returns an array with a single element containing the value of that array element
public static extractAttributeAsArray ( array &$attribArray, string $attributeName ) : array
$attribArray array attributes from a search response
$attributeName string indicates which element of the passed array to extract
리턴 array array of $attributeName objects, or a single element array

implodeAssociativeArray() 공개 정적인 메소드

public static implodeAssociativeArray ( array $array, string $separator = '=', string $glue = ', ' ) : boolean
$array array associative array to implode
$separator string (optional, defaults to =)
$glue string (optional, defaults to ', ')
리턴 boolean

returnObjectOrThrowException() 공개 정적인 메소드

public static returnObjectOrThrowException ( string $className, object $resultObj ) : object
$className string
$resultObj object
리턴 object returns the passed object if successful

throwStatusCodeException() 공개 정적인 메소드

throws an exception based on the type of error
public static throwStatusCodeException ( string $statusCode, null | string $message = null ) : void
$statusCode string HTTP status code to throw exception from
$message null | string
리턴 void

verifyKeys() 공개 정적인 메소드

compares the expected signature of a gateway request against the actual structure sent by the user
public static verifyKeys ( array $signature, array $attributes )
$signature array
$attributes array