public function resolve($subject, array $parameters = [])
    {
        if ($this->isClass($subject)) {
            return $this->resolveClass($subject, $parameters);
        }

        if ($this->isMethod($subject)) {
            return $this->resolveMethod($subject, $parameters);
        }

        if ($this->isFunction($subject)) {
            return $this->resolveFunction($subject, $parameters);
        }

        $subject = \is_object($subject) ? \get_class($subject) : $subject;

        throw new BindingResolutionException(\sprintf(
            '[%s] is not resolvable. Build stack : [%s]',
            $subject,
            \implode(', ', $this->buildStack)
        ));
    }
public function resolve($subject, array $parameters = [])
    {
        if ($this->isClass($subject)) {
            return $this->resolveClass($subject, $parameters);
        }

        if ($this->isMethod($subject)) {
            return $this->resolveMethod($subject, $parameters);
        }

        if ($this->isFunction($subject)) {
            return $this->resolveFunction($subject, $parameters);
        }

        $subject = \is_object($subject) ? \get_class($subject) : $subject;

        throw new BindingResolutionException(\sprintf(
            '[%s] is not resolvable. Build stack : [%s]',
            $subject,
            \implode(', ', $this->buildStack)
        ));
    }
public function resolve ( $ subject , array $ parameters = [ ] ) { if ( $ this -> isClass ( $ subject ) ) { return $ this -> resolveClass ( $ subject , $ parameters ) ; } if ( $ this -> isMethod ( $ subject ) ) { return $ this -> resolveMethod ( $ subject , $ parameters ) ; } if ( $ this -> isFunction ( $ subject ) ) { return $ this -> resolveFunction ( $ subject , $ parameters ) ; } $ subject = \ is_object ( $ subject ) ? \ get_class ( $ subject ) : $ subject ; throw new BindingResolutionException ( \ sprintf ( '[%s] is not resolvable. Build stack : [%s]' , $ subject , \ implode ( ', ' , $ this -> buildStack ) ) ) ; }
Resolves an entry by its name. If given a class name, it will return a new instance of that class.

@param mixed $subject
@param array $parameters

@throws \Viserio\Component\Contract\Container\Exception\BindingResolutionException
@throws \Viserio\Component\Contract\Container\Exception\CyclicDependencyException
@throws \ReflectionException

@return mixed|object
Resolves an entry by its name . If given a class name it will return a new instance of that class .