Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function loadRules($path) |
||
36 | { |
||
37 | // single resource |
||
38 | if (is_string($path)) { |
||
39 | $content = @file_get_contents($path); |
||
40 | if ($content) { |
||
41 | $rules = preg_split("/(\r\n|\n|\r)/", $content); |
||
42 | $this->addRules($rules); |
||
43 | } |
||
44 | // array of resources |
||
45 | } elseif (is_array($path)) { |
||
46 | foreach ($path as $item) { |
||
47 | $this->loadRules($item); |
||
48 | } |
||
49 | } |
||
50 | } |
||
51 | |||
93 |