before_filter()
6: function before_filter() {
7: if (isset ($this->before_filter)) {
8: foreach ($this->before_filter as $method => $actions) {
9: if (is_array($actions)) {
10: if (isset ($actions['except'])) {
11: $actions = explode(',', $actions['except']);
12: if (!in_array($this->action, $actions)) {
13: call_user_func(array (
14: $this,
15: $method
16: ));
17: }
18: }
19: elseif (isset ($actions['only'])) {
20: $actions = explode(',', $actions['only']);
21: if (in_array($this->action, $actions)) {
22: call_user_func(array (
23: $this,
24: $method
25: ));
26: }
27: } else {
28: call_user_func(array (
29: $this,
30: $method
31: ));
32: }
33: } else {
34: $actions = explode(',', $actions);
35: foreach ($actions as $method) {
36: call_user_func(array (
37: $this,
38: $method
39: ));
40: }
41: }
42: }
43: }
44: }
File: lib/controller/Filters.php, #line 6
