| Total Complexity | 15 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait TContainer { |
||
| 10 | /** |
||
| 11 | * @return \IContainer |
||
| 12 | */ |
||
| 13 | public function _getContainer() { |
||
| 14 | return null; |
||
| 15 | } |
||
| 16 | |||
| 17 | public function __set($name, $value) { |
||
| 18 | is_object($this->_getContainer()) ? $this->_getContainer()->__set($name, $value) : null; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function __isset($name) { |
||
| 22 | return is_object($this->_getContainer()) ? $this->_getContainer()->__isset($name) : null; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function __get($name) { |
||
| 26 | return is_object($this->_getContainer()) ? $this->_getContainer()->__get($name) : null; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function __unset($name) { |
||
| 30 | is_object($this->_getContainer()) ? $this->_getContainer()->__unset($name) : null; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Is container contains no data |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public function isEmpty() { |
||
| 39 | return is_object($this->_getContainer()) ? $this->_getContainer()->isEmpty() : false; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Clears container contents |
||
| 44 | */ |
||
| 45 | public function clear() { |
||
| 46 | is_object($this->_getContainer()) ? $this->_getContainer()->clear() : null; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function __call($name, $arguments) { |
||
| 51 | } |
||
| 52 | |||
| 53 | } |
||
| 54 |