src/Mappable/Hooks.php 1 location
|
@@ 135-142 (lines=8) @@
|
| 132 |
|
}; |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
public function __call($method, $params) |
| 136 |
|
{ |
| 137 |
|
if (strpos($method, '__') === 0 && method_exists($this, $method.'Hook')) { |
| 138 |
|
return call_user_func_array([$this, $method.'Hook'], $params); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
throw new BadMethodCallException("Method [{$method}] doesn't exist on this object."); |
| 142 |
|
} |
| 143 |
|
/** |
| 144 |
|
* Register hook on toArray method. |
| 145 |
|
* |
src/Metable/Hooks.php 1 location
|
@@ 157-164 (lines=8) @@
|
| 154 |
|
}; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
public function __call($method, $params) |
| 158 |
|
{ |
| 159 |
|
if (strpos($method, '__') === 0 && method_exists($this, $method.'Hook')) { |
| 160 |
|
return call_user_func_array([$this, $method.'Hook'], $params); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
throw new BadMethodCallException("Method [{$method}] doesn't exist on this object."); |
| 164 |
|
} |
| 165 |
|
} |
| 166 |
|
|