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 has the following Resolvers:
ConsoleResolver- provides Terminal arguments to Commands. See Command Arguments.
FormResolver- provides direct access to GET/POST values to Forms.
RequestResolver- provides direct access to objects within a Request as well as individual Cookie and FileGroup objects.
RouterParametersResolver- provides Route Parameters to Controllers.
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.
You can obtain the Resolver Group from a Container:
use Centum\Interfaces\Container\ContainerInterface; /** @var ContainerInterface $container */ $resolverGroup = $container->getResolverGroup();