Пример #1
0
 /**
  * Class constructor.
  * Calls the parent constructor.
  * @param \Brickoo\Component\IoC\Resolver\DefinitionResolver $resolver
  * @param array $definitions
  */
 public function __construct(DefinitionResolver $resolver, array $definitions = [])
 {
     parent::__construct($definitions, new ConstraintValidator(new IsInstanceOfConstraint("\\Brickoo\\Component\\IoC\\Definition\\DependencyDefinition")));
     $this->resolver = $resolver;
     $this->calledDependencies = [];
     $this->singletons = [];
     $this->recursionCounter = 0;
 }
Пример #2
0
 /** @param array $headerFieldList */
 public function __construct(array $headerFieldList = [])
 {
     parent::__construct([], new ConstraintValidator(new IsInstanceOfConstraint("\\Brickoo\\Component\\Http\\HttpHeaderField")));
     $this->importHeaderFieldList($headerFieldList);
 }
 /**
  * Class constructor.
  * @param integer $recursionDepthLimit default 5
  */
 public function __construct($recursionDepthLimit = 5)
 {
     Assert::isInteger($recursionDepthLimit);
     $this->recursionDepthLimit = $recursionDepthLimit;
     parent::__construct();
 }
Пример #4
0
 /** @covers Brickoo\Component\Common\Container::clear */
 public function testFlushContainerEntries()
 {
     $container = new Container(["key" => "value"]);
     $container->clear();
     $this->assertAttributeEquals([], "container", $container);
 }