src/Weew/Container/Reflector.php
public function resolveCallable(
        IContainer $container,
        $callable,
        array $args = []
    ) {
        if (is_string($callable) && function_exists($callable) || is_object($callable)) {
            return $this->resolveFunction($container, $callable, $args);
        } else if (is_array($callable) && is_callable($callable)) {
            return $this->resolveMethod($container, $callable[0], $callable[1], $args);
        } else {
            throw new InvalidCallableFormatException('Invalid callable given.');
        }
    }
public function resolveCallable(
        IContainer $container,
        $callable,
        array $args = []
    ) {
        if (is_string($callable) && function_exists($callable) || is_object($callable)) {
            return $this->resolveFunction($container, $callable, $args);
        } else if (is_array($callable) && is_callable($callable)) {
            return $this->resolveMethod($container, $callable[0], $callable[1], $args);
        } else {
            throw new InvalidCallableFormatException('Invalid callable given.');
        }
    }
@param IContainer $container
@param $callable
@param array $args

@return mixed
@throws Exception
@throws UnresolveableArgumentException