for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of PHPinnacle/Ensign.
*
* (c) PHPinnacle Team <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types = 1);
namespace PHPinnacle\Ensign\Arguments;
use Psr\Container\ContainerInterface;
final class ContainerArguments extends ReflectionArguments
{
* @var ContainerInterface
private $container;
* @param ContainerInterface $container
public function __construct(ContainerInterface $container)
$this->container = $container;
}
* {@inheritdoc}
protected function resolveArgument(\ReflectionClass $class)
return $this->container->has($class->getName()) ? $this->container->get($class->getName()) : null;