for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wandu\DI;
use Wandu\DI\ContainerFluent;
class Descriptor implements ContainerFluent
{
/** @var array */
public $assigns = [];
public $wires = [];
/** @var callable[] */
public $afterHandlers = [];
/** @var bool */
public $factory = false;
public $frozen = false;
/**
* {@inheritdoc}
*/
public function assign(string $paramName, $target): ContainerFluent
$this->assigns[$paramName] = $target;
return $this;
}
public function assignMany(array $params = []): ContainerFluent
$this->assigns = $params + $this->assigns;
public function wire(string $propertyName, $target): ContainerFluent
$this->wires[$propertyName] = $target;
public function wireMany(array $properties): ContainerFluent
$this->wires = $properties + $this->wires;
public function after(callable $handler): ContainerFluent
$this->afterHandlers[] = $handler;
public function factory(): ContainerFluent
$this->factory = true;
public function freeze(): ContainerFluent
$this->frozen = true;