1 | <?php |
||
7 | class WhereFilter |
||
8 | { |
||
9 | /** |
||
10 | * @param array|\ArrayAccess[] $array The elements to filter through |
||
11 | * @param string $key The key value in an associative array or FrontMatter |
||
12 | * @param string $comparison The actual comparison symbols being used |
||
13 | * @param mixed $value The value we're searching for |
||
14 | * |
||
15 | * @return array |
||
16 | */ |
||
17 | public function __invoke ($array, $key, $comparison, $value) |
||
24 | |||
25 | /** |
||
26 | * @return \Twig_SimpleFilter |
||
27 | */ |
||
28 | public static function get () |
||
32 | |||
33 | /** |
||
34 | * Recursive searching calling our comparison |
||
35 | * |
||
36 | * @param array|\ArrayAccess[] $array The elements to filter through |
||
37 | * @param string $key The key value in an associative array or FrontMatter |
||
38 | * @param string $comparison The actual comparison symbols being used |
||
39 | * @param string $value The value we're searching for |
||
40 | * @param array $results The reference to where to keep the filtered elements |
||
41 | */ |
||
42 | private function search_r ($array, $key, $comparison, $value, &$results) |
||
59 | 20 | ||
60 | /** |
||
61 | * The logic for determining if an element matches the filter |
||
62 | * |
||
63 | * @param array|\ArrayAccess[] $array The elements to filter through |
||
64 | * @param string $key The key value in an associative array or FrontMatter |
||
65 | * @param string $comparison The actual comparison symbols being used |
||
66 | * @param mixed $value The value we're searching for |
||
67 | * |
||
68 | * @return bool |
||
69 | * |
||
70 | * @throws Twig_Error_Syntax |
||
71 | */ |
||
72 | private function compare ($array, $key, $comparison, $value) |
||
88 | |||
89 | private function contains ($haystack, $needle) |
||
94 | } |
This check looks for method names that are not written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes
databaseConnectionSeeker
.