Respect\Validation\Rules\Locale\Factory::bic PHP Метод

bic() публичный Метод

public bic ( $countryCode ) : Respect\Validation\Validatable
Результат Respect\Validation\Validatable
    public function bic($countryCode)
    {
        $filteredCountryCode = mb_strtoupper($countryCode);
        switch ($filteredCountryCode) {
            case 'DE':
                return new GermanBic();
            default:
                throw new ComponentException(sprintf('Cannot provide BIC validation for country "%s"', $countryCode));
        }
    }

Usage Example

Пример #1
0
 /**
  * Defines the country code.
  *
  * The country code is not case sensitive.
  *
  * @param string  $countryCode The ISO 639-1 country code.
  * @param Factory $factory
  */
 public function __construct($countryCode, Factory $factory = null)
 {
     if (null === $factory) {
         $factory = new Factory();
     }
     $this->validatable = $factory->bic($countryCode);
 }
All Usage Examples Of Respect\Validation\Rules\Locale\Factory::bic