public static function get($handlers, $handler_id, $name)
    {
        $callable = static::getCallable($handlers, $handler_id, $name);

        if (is_array($callable)) {

            if (is_callable($callable)) {
                $callable[0] = Container::get($callable[0]);
                return $callable;
            }

            throw new BadMethodCallException(implode('::', $callable) . ' is not callable');
        }

        if ($callable instanceof \Closure) {
            return $callable;
        }

        throw new UnexpectedValueException('Unexpected handler format');
    }
public static function get($handlers, $handler_id, $name)
    {
        $callable = static::getCallable($handlers, $handler_id, $name);

        if (is_array($callable)) {

            if (is_callable($callable)) {
                $callable[0] = Container::get($callable[0]);
                return $callable;
            }

            throw new BadMethodCallException(implode('::', $callable) . ' is not callable');
        }

        if ($callable instanceof \Closure) {
            return $callable;
        }

        throw new UnexpectedValueException('Unexpected handler format');
    }
public static function get ( $ handlers , $ handler_id , $ name ) { $ callable = static :: getCallable ( $ handlers , $ handler_id , $ name ) ; if ( is_array ( $ callable ) ) { if ( is_callable ( $ callable ) ) { $ callable [ 0 ] = Container :: get ( $ callable [ 0 ] ) ; return $ callable ; } throw new BadMethodCallException ( implode ( '::' , $ callable ) . ' is not callable' ) ; } if ( $ callable instanceof \ Closure ) { return $ callable ; } throw new UnexpectedValueException ( 'Unexpected handler format' ) ; }
Returns a handler
@param array $handlers
@param string|null $handler_id
@param string $name
@return object|array
@throws BadMethodCallException
@throws UnexpectedValueException
Returns a handler