@@ 832-835 (lines=4) @@ | ||
829 | ) { |
|
830 | throw $this->exception('Hook does not exist'); |
|
831 | } |
|
832 | if (is_object($callable) && !is_callable($callable)) { |
|
833 | $callable = array($callable, $hook_spot); |
|
834 | // short for addHook('test', $this); to call $this->test(); |
|
835 | } |
|
836 | ||
837 | $this->hooks[$hook_spot][$priority][] = array($callable, $arguments); |
|
838 | ||
@@ 1009-1011 (lines=3) @@ | ||
1006 | ||
1007 | return $this; |
|
1008 | } |
|
1009 | if (is_object($callable) && !is_callable($callable)) { |
|
1010 | $callable = array($callable, $name); |
|
1011 | } |
|
1012 | if ($this->hasMethod($name)) { |
|
1013 | throw $this->exception('Registering method twice'); |
|
1014 | } |