1 | <?php |
||
62 | class FilterDotNotationPath |
||
63 | { |
||
64 | /** |
||
65 | * extract a value from an array, using dot.notation.support |
||
66 | * |
||
67 | * @param array $arr |
||
68 | * the array to extract from |
||
69 | * @param string $index |
||
70 | * the dot.notation.support path to walk |
||
71 | * @return mixed |
||
72 | * whatever we find when we walk the path |
||
73 | */ |
||
74 | public static function fromArray($arr, $index) |
||
81 | |||
82 | /** |
||
83 | * extract a value from an object, using dot.notation.support |
||
84 | * |
||
85 | * @param object $obj |
||
86 | * the object to extract from |
||
87 | * @param string $property |
||
88 | * the dot.notation.support path to walk |
||
89 | * @return mixed |
||
90 | * whatever we find when we walk the path |
||
91 | */ |
||
92 | public static function fromObject($obj, $property) |
||
99 | |||
100 | /** |
||
101 | * extract a value from a container, using dot.notation.support |
||
102 | * |
||
103 | * @param mixed $item |
||
104 | * the container to extract from |
||
105 | * @param string $path |
||
106 | * the dot.notation.support path to walk |
||
107 | * @return mixed |
||
108 | * whatever we find when we walk the path |
||
109 | */ |
||
110 | public static function from($item, $path) |
||
121 | |||
122 | /** |
||
123 | * extract a value from a variable, using dot.notation.support |
||
124 | * |
||
125 | * @deprecated since 2.2.0 |
||
126 | * @codeCoverageIgnore |
||
127 | * |
||
128 | * @param object|array $item |
||
129 | * the variable to extract from |
||
130 | * @param string $property |
||
131 | * the dot.notation.support path to walk |
||
132 | * @return mixed |
||
133 | * whatever we find when we walk the path |
||
134 | */ |
||
135 | public static function fromMixed($item, $property) |
||
139 | |||
140 | /** |
||
141 | * extract a value from a variable, using dot.notation.support |
||
142 | * |
||
143 | * @param object|array $item |
||
144 | * the variable to extract from |
||
145 | * @param string $property |
||
146 | * the dot.notation.support path to walk |
||
147 | * @return mixed |
||
148 | * whatever we find when we walk the path |
||
149 | */ |
||
150 | public function __invoke($item, $property) |
||
154 | } |