PHP Class Braintree\Error\ErrorCollection

Contains a read-only property $error which is a ValidationErrorCollection
Inheritance: implements Countable
Afficher le fichier Open project: braintree/braintree_php

Méthodes publiques

Méthode Description
__construct ( $errorData )
__get ( $name )
__toString ( )
count ( ) : integer Return count of items in collection Implements countable
deepAll ( ) Returns all of the validation errors at all levels of nesting in a single, flat array.
deepSize ( ) : integer Returns the total number of validation errors at all levels of nesting. For example, if creating a customer with a credit card and a billing address, and each of the customer, credit card, and billing address has 1 error, this method will return 3.
forKey ( string $key ) : mixed return errors for the passed key name
onHtmlField ( string $field ) : array return errors for the passed html field.
shallowAll ( ) Returns the errors at the given nesting level (see forKey) in a single, flat array:

Method Details

__construct() public méthode

public __construct ( $errorData )

__get() public méthode

public __get ( $name )

__toString() public méthode

public __toString ( )

count() public méthode

Return count of items in collection Implements countable
public count ( ) : integer
Résultat integer

deepAll() public méthode

Returns all of the validation errors at all levels of nesting in a single, flat array.
public deepAll ( )

deepSize() public méthode

Returns the total number of validation errors at all levels of nesting. For example, if creating a customer with a credit card and a billing address, and each of the customer, credit card, and billing address has 1 error, this method will return 3.
public deepSize ( ) : integer
Résultat integer size

forKey() public méthode

return errors for the passed key name
public forKey ( string $key ) : mixed
$key string
Résultat mixed

onHtmlField() public méthode

For example, $result->errors->onHtmlField("transaction[customer][last_name]")
public onHtmlField ( string $field ) : array
$field string
Résultat array

shallowAll() public méthode

$result = Customer::create(...); $customerErrors = $result->errors->forKey('customer')->shallowAll();
public shallowAll ( )