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: }
28: } else {
29: $actions = explode(',', $actions);
30: foreach ($actions as $method) {
31: call_user_func(array (
32: $this,
33: $method
34: ));
35: }
36: }
37: }
38: }
39: }
File: lib/controller/Filters.php, #line 6
