| 1 | <?php |
||
| 18 | abstract class AbstractDefinitionSource implements DefinitionSourceInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $definitions = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * DefinitionSource constructor. |
||
| 27 | * |
||
| 28 | * @param array $definitions |
||
| 29 | */ |
||
| 30 | public function __construct(array $definitions = []) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Add definitions to the DI. |
||
| 37 | * |
||
| 38 | * @param array $definitions |
||
| 39 | */ |
||
| 40 | public function add(array $definitions) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns true if the DI can return an entry for the given name. |
||
| 47 | * Returns false otherwise. |
||
| 48 | * |
||
| 49 | * @param $name |
||
| 50 | * |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | public function has($name) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Set the DI definition for the entry name. |
||
| 64 | * |
||
| 65 | * @param $name |
||
| 66 | * @param $value |
||
| 67 | */ |
||
| 68 | public function set($name, $value) |
||
| 72 | } |
||
| 73 |