Stripe\Util\Util::isList PHP 메소드

isList() 공개 정적인 메소드

Whether the provided array (or other) is a list rather than a dictionary.
public static isList ( array | mixed $array ) : boolean
$array array | mixed
리턴 boolean True if the given object is a list.
    public static function isList($array)
    {
        if (!is_array($array)) {
            return false;
        }
        // TODO: generally incorrect, but it's correct given Stripe's response
        foreach (array_keys($array) as $k) {
            if (!is_numeric($k)) {
                return false;
            }
        }
        return true;
    }