File code/addon/Hook.php

class Lia\Addon\Hook

Constants

Properties

  • public $fqn = 'lia:server.hook';
  • public $hooks = []; array of hooks like ['hook.name'=>[ [$object, 'method'], function(){echo "one";} ] ];

Methods

  • public function __construct($lia=null, $namenull)
  • public function prefix_method_added($obj, $method, $hook_name) Add an object's method as a hook.
  • public function add($name, $callable)
  • public function call($name, ...$args)