lib/BlockCypher/Validation/CoinSymbolValidator.php
public static function validate($argument, $argumentName = null)
    {
        // DEBUG
        //echo "Argument: $argument\n";
        //echo "Argument name: $argumentName\n";

        if ($argument === null) {
            self::throwException($argument, $argumentName);
        }

        if (gettype($argument) != 'string') {
            self::throwException($argument, $argumentName);
        }

        if (gettype($argument) == 'string' && trim($argument) == '') {
            self::throwException($argument, $argumentName);
        }

        if (!in_array($argument, BlockCypherCoinSymbolConstants::COIN_SYMBOL_LIST())) {
            self::throwException($argument, $argumentName);
        }

        return true;
    }
public static function validate($argument, $argumentName = null)
    {
        // DEBUG
        //echo "Argument: $argument\n";
        //echo "Argument name: $argumentName\n";

        if ($argument === null) {
            self::throwException($argument, $argumentName);
        }

        if (gettype($argument) != 'string') {
            self::throwException($argument, $argumentName);
        }

        if (gettype($argument) == 'string' && trim($argument) == '') {
            self::throwException($argument, $argumentName);
        }

        if (!in_array($argument, BlockCypherCoinSymbolConstants::COIN_SYMBOL_LIST())) {
            self::throwException($argument, $argumentName);
        }

        return true;
    }
public static function validate ( $ argument , $ argumentName = null ) { // DEBUG //echo "Argument: $argument\n"; //echo "Argument name: $argumentName\n"; if ( $ argument === null ) { self :: throwException ( $ argument , $ argumentName ) ; } if ( gettype ( $ argument ) != 'string' ) { self :: throwException ( $ argument , $ argumentName ) ; } if ( gettype ( $ argument ) == 'string' && trim ( $ argument ) == '' ) { self :: throwException ( $ argument , $ argumentName ) ; } if ( ! in_array ( $ argument , BlockCypherCoinSymbolConstants :: COIN_SYMBOL_LIST ( ) ) ) { self :: throwException ( $ argument , $ argumentName ) ; } return true ; }
Helper method for validating an argument if it is valid coin symbol

@param mixed $argument
@param string|null $argumentName
@return bool
Helper method for validating an argument if it is valid coin symbol