| 1 | <?php  | 
            ||
| 15 | class Hash extends \ArrayObject implements \JsonSerializable  | 
            ||
| 16 | { | 
            ||
| 17 | /**  | 
            ||
| 18 | * Specify data which should be serialized to JSON  | 
            ||
| 19 | *  | 
            ||
| 20 | * @return object  | 
            ||
| 21 | */  | 
            ||
| 22 | public function jsonSerialize()  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * Clean up, remove empty positions of second level and above  | 
            ||
| 29 | *  | 
            ||
| 30 | * @param array $input to be cleaned up  | 
            ||
| 31 | * @return array  | 
            ||
| 32 | */  | 
            ||
| 33 | private function arrayFilterRecursive($input)  | 
            ||
| 45 | |||
| 46 | /**  | 
            ||
| 47 | * Remove NULL values or Empty array object  | 
            ||
| 48 | * @param mixed $var object field value  | 
            ||
| 49 | * @return bool  | 
            ||
| 50 | */  | 
            ||
| 51 | private function cleanUpArray($var)  | 
            ||
| 64 | }  | 
            ||
| 65 |