| 1 | <?php  | 
            ||
| 11 | final class DependencyProvider implements DependencyInterface  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * @var string|null  | 
            ||
| 15 | */  | 
            ||
| 16 | public $context;  | 
            ||
| 17 | |||
| 18 | /**  | 
            ||
| 19 | * Provider dependency  | 
            ||
| 20 | *  | 
            ||
| 21 | * @var Dependency  | 
            ||
| 22 | */  | 
            ||
| 23 | private $dependency;  | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * @var bool  | 
            ||
| 27 | */  | 
            ||
| 28 | private $isSingleton = false;  | 
            ||
| 29 | |||
| 30 | /**  | 
            ||
| 31 | * @var mixed  | 
            ||
| 32 | */  | 
            ||
| 33 | private $instance;  | 
            ||
| 34 | |||
| 35 | 49 | public function __construct(Dependency $dependency, string $context)  | 
            |
| 40 | |||
| 41 | 4 | public function __sleep()  | 
            |
| 45 | |||
| 46 | 1 | public function __toString()  | 
            |
| 47 |     { | 
            ||
| 48 | 1 | return sprintf(  | 
            |
| 49 | 1 | '(provider) %s',  | 
            |
| 50 | 1 | (string) $this->dependency  | 
            |
| 51 | );  | 
            ||
| 52 | }  | 
            ||
| 53 | |||
| 54 | /**  | 
            ||
| 55 |      * {@inheritdoc} | 
            ||
| 56 | */  | 
            ||
| 57 | 49 | public function register(array &$container, Bind $bind)  | 
            |
| 61 | |||
| 62 | /**  | 
            ||
| 63 |      * {@inheritdoc} | 
            ||
| 64 | */  | 
            ||
| 65 | 13 | public function inject(Container $container)  | 
            |
| 78 | |||
| 79 | /**  | 
            ||
| 80 |      * {@inheritdoc} | 
            ||
| 81 | */  | 
            ||
| 82 | 42 | public function setScope($scope)  | 
            |
| 88 | |||
| 89 | 3 | public function setContext(SetContextInterface $provider)  | 
            |
| 93 | }  | 
            ||
| 94 |