protected function getCallable($value, $key)
    {
        // If the value is a string, a registrar is set and the value is
        // registred with the registrar, resolve it there.
        if (
            is_string($value) &&
            $this->hasRegistrar() &&
            $this->registrar->isRegistred($value)
        ) {
            $value = $this->registrar->resolve($value);
        }

        // If the value is now a callable, go ahead and return it...
        if (is_callable($value)) {
            return $value;
        }

        // However, if we've got an object and a filter method for the key
        // exists, we'll return that as a callable.
        if (
            is_object($value) &&
            method_exists($value, $method = $this->getFilterMethodName($key))
        ) {
            return [$value, $method];
        }

        throw new InvalidArgumentException(sprintf(
            'Could not resolve callable for [%s]', $value
        ));
    }