| @@ 70-79 (lines=10) @@ | ||
| 67 | * @throws InvalidArgumentException |
|
| 68 | * @return LifecycleEvents |
|
| 69 | */ |
|
| 70 | public function __call($event, $args) |
|
| 71 | { |
|
| 72 | if (array_key_exists($event, $this->events)) { |
|
| 73 | array_unshift($args, $event); |
|
| 74 | ||
| 75 | return call_user_func_array([$this, 'add'], $args); |
|
| 76 | } |
|
| 77 | ||
| 78 | throw new InvalidArgumentException('Fluent builder method [' . $event . '] does not exist'); |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * @param string $event |
|
| @@ 61-70 (lines=10) @@ | ||
| 58 | * |
|
| 59 | * @return LifecycleEvents |
|
| 60 | */ |
|
| 61 | public function __call($method, $args) |
|
| 62 | { |
|
| 63 | if (array_key_exists($method, $this->events)) { |
|
| 64 | array_unshift($args, $method); |
|
| 65 | ||
| 66 | return call_user_func_array([$this, 'add'], $args); |
|
| 67 | } |
|
| 68 | ||
| 69 | throw new InvalidArgumentException('Fluent builder method ['.$method.'] does not exist'); |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @param string $event |
|