Resolvers

A Resolver takes a parameter from a method or a function and tries to resolve it into an object or a value. Resolved values/objects are not stored in the Container unless the Resolver specifically adds it to the Object Storage.

Resolvers must implement Centum\Interfaces\Container\ResolverInterface.

Centum has the following Resolvers:

Resolver Group

The Resolver Group is responsible for storing all of the Resolvers and iterating through them to find a possible value. After all the Resolvers have been tried, the Resolver Group which will try to find or create an object from the Container.

Centum\Container\ResolverGroup();

Centum\Container\ResolverGroup implements Centum\Interfaces\Container\ResolverGroupInterface.

You can obtain the Resolver Group from a Container:

use Centum\Interfaces\Container\ContainerInterface;

/** @var ContainerInterface $container */

$resolverGroup = $container->getResolverGroup();