1: <?php
2: /**
3: * Knot module.
4: *
5: * PHP version 5
6: *
7: * @category PHP
8: * @package Knot
9: * @author Ă–mer Kala <kalaomer@hotmail.com>
10: * @license https://raw.githubusercontent.com/kalaomer/knot/master/LICENSE.txt MIT licence
11: * @version GIT: $Id https://github.com/kalaomer/knot/
12: * @link https://github.com/kalaomer/knot/
13: */
14:
15: /**
16: * Essential EasyArray function.
17: *
18: * @return \Knot\Dict\ParentDict
19: */
20: function ar()
21: {
22: return Knot\Dict::create(func_get_args());
23: }
24:
25: /**
26: * Essential EasyArray function.
27: *
28: * @param array $array Knot data.
29: *
30: * @return \Knot\Dict\ParentDict
31: */
32: function arr(array $array)
33: {
34: return Knot\Dict::create($array);
35: }
36:
37: /**
38: * Essential EasyArray function.
39: *
40: * @param array &$array Knot data.
41: *
42: * @return \Knot\Dict\ParentDict
43: */
44: function arrRef(&$array)
45: {
46: return Knot\Dict::createByReference($array);
47: }
48:
49: /**
50: * @param mixed $instance
51: *
52: * @return bool
53: */
54: function is_dict($instance)
55: {
56: return $instance instanceof \Knot\Dict;
57: }
58: