| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin container. |
| 4 |
* |
| 5 |
* @copyright (c) 2021, Code Atlantic LLC. |
| 6 |
* |
| 7 |
* @package ContentControl |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace ContentControl\Base; |
| 11 |
|
| 12 |
defined( 'ABSPATH' ) || exit; |
| 13 |
|
| 14 |
use ContentControl\Vendor\Pimple\Container as Base; |
| 15 |
|
| 16 |
/** |
| 17 |
* Localized container class. |
| 18 |
*/ |
| 19 |
class Container extends Base { |
| 20 |
/** |
| 21 |
* Get item from container |
| 22 |
* |
| 23 |
* @param string $id Key for the item. |
| 24 |
* |
| 25 |
* @return mixed Current value of the item. |
| 26 |
*/ |
| 27 |
public function get( $id ) { |
| 28 |
return $this->offsetGet( $id ); |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Set item in container |
| 33 |
* |
| 34 |
* @param string $id Key for the item. |
| 35 |
* @param mixed $value Value to be set. |
| 36 |
* |
| 37 |
* @return void |
| 38 |
*/ |
| 39 |
public function set( $id, $value ) { |
| 40 |
$this->offsetSet( $id, $value ); |
| 41 |
} |
| 42 |
} |
| 43 |
|