public static function argToType()

in consumer/Type.php [67:93]


    public static function argToType($arg)
    {
        $type = gettype($arg);
        switch ($type) {
            case 'integer':
            case 'boolean':
            case 'double':
            case 'string':
            case 'NULL':
                return self::adapter[Type::DEFAULT_TYPE];
            case 'array':
                if (Collection::isSequential($arg)) {
                    return self::adapter[Type::ARRAYLIST];
                } else {
                    return self::adapter[Type::DEFAULT_TYPE];
                }
            case 'object':
                if ($arg instanceof Type) {
                    $className = $arg->className;
                } else {
                    $className = get_class($arg);
                }
                return 'L' . str_replace(['.', '\\'], '/', $className) . ';';
            default:
                throw new ConsumerException("Handler for type {$type} not implemented");
        }
    }