atk4 / book

4 stars 23 forks source link

simplify default for addHook #30

Closed ayurmedia closed 8 years ago

ayurmedia commented 9 years ago

$this is already known and no need to pass as parameter

romaninsh commented 8 years ago

wrong place to raise commend, but this won't always, work, because in most casse you have 2 objects in the work here:

$obj1->addHook('hook', $obj2);

this way $obj1 will call method of $obj2. Adding hooks on the same object is actually a rare case.