mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-12 01:04:27 +02:00
Hook calls can now be forked into a worker queue entry
This commit is contained in:
parent
66e3c1836e
commit
47d165cb25
9 changed files with 47 additions and 68 deletions
19
src/Worker/ForkHook.php
Normal file
19
src/Worker/ForkHook.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* @file src/Worker/ForkHook.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Worker;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
|
||||
Class ForkHook {
|
||||
public static function execute($name, $hook_json, $data_json) {
|
||||
global $a;
|
||||
|
||||
$hook = json_decode($hook_json, true);
|
||||
$data = json_decode($data_json, true);
|
||||
|
||||
Addon::callSingleHook($a, $name, $hook, $data);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue