/**
* @param string $hookPoint
* @param array|object|null $parameters
* @return false|mixed
*/
public function fetch(string $hookPoint, array|object|null $parameters = []){
if($res = current($this->hookPoints[$hookPoint]["data"]))
{
next($this->hookPoints[$hookPoint]["data"]);
}
if (!is_array($res))
return false;
$result = call_user_func_array(
$this->prepareCallback($res["callback"]),
$this->getParameters($parameters)
);
$this->setOutput($result);
$this->log("Output-Fetch", $hookPoint);
return $result;
}
exemple:
while ($r = \hooks()->fetch("crm.car.update", $fields)){