1 | <?php |
||
34 | trait NameGlobbingTrait |
||
35 | { |
||
36 | /** |
||
37 | * Returns all names matches with $eventName |
||
38 | * |
||
39 | * e.g. |
||
40 | * 'user.login' matches '*', 'u*.*', 'user.*', 'user.l*', 'user.login' etc. |
||
41 | * |
||
42 | * @param string $eventName |
||
43 | * @param array $names |
||
44 | * @return array |
||
45 | * @access protected |
||
46 | */ |
||
47 | protected function globEventNames( |
||
59 | |||
60 | /** |
||
61 | * Check to see if $name matches with $eventName |
||
62 | * |
||
63 | * e.g. |
||
64 | * ```php |
||
65 | * // true |
||
66 | * $this->matchEventName('user.*', 'user.login'); |
||
67 | * |
||
68 | * // true |
||
69 | * $this->matchEventName('*', 'user.login'); |
||
70 | * |
||
71 | * // false |
||
72 | * $this->matchEventName('blog.*', 'user.login'); |
||
73 | * ``` |
||
74 | * |
||
75 | * @param string $name |
||
76 | * @param string $eventName |
||
77 | * @return bool |
||
78 | * @access protected |
||
79 | */ |
||
80 | protected function matchEventName( |
||
93 | } |
||
94 |