1: <?php
2:
3: namespace Chromabits\Nucleus\Support;
4:
5: use Chromabits\Nucleus\Foundation\StaticObject;
6:
7: /**
8: * Class Json
9: *
10: * @author Eduardo Trujillo <ed@chromabits.com>
11: * @package Chromabits\Nucleus\Support
12: */
13: class Json extends StaticObject
14: {
15: /**
16: * Placeholder.
17: *
18: * @param mixed $value
19: * @param int $options
20: * @param int $depth
21: *
22: * @return string
23: */
24: public static function encode($value, $options = 0, $depth = 512)
25: {
26: return json_encode($value, $options, $depth);
27: }
28:
29: /**
30: * Placeholder.
31: *
32: * @param mixed $value
33: * @param int $options
34: * @param int $depth
35: *
36: * @return mixed
37: */
38: public static function decode($value, $options = 0, $depth = 512)
39: {
40: return json_decode($value, true, $depth, $options);
41: }
42: }
43: