1 | <?php |
||
5 | class Bag |
||
6 | { |
||
7 | /** |
||
8 | * The internal data store for this bag. |
||
9 | * |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $store = []; |
||
13 | |||
14 | /** |
||
15 | * Create a new bag with the given store data. |
||
16 | * |
||
17 | * @param array $store The associated data. |
||
18 | */ |
||
19 | public function __construct($store) |
||
23 | |||
24 | /** |
||
25 | * Magic method to fetch data from the store. |
||
26 | * |
||
27 | * @param string $name The name of value to fetch. |
||
28 | * @param mixed $args Associated arguments (ignored). |
||
29 | * |
||
30 | * @return mixed|null The value. |
||
31 | */ |
||
32 | public function __call($name, $args) |
||
40 | } |