Microweber\Utils\Adapters\Event\LaravelEvent::event_bind PHP Method

event_bind() public static method

public static event_bind ( $hook_name, $callback = false )
    public static function event_bind($hook_name, $callback = false)
    {
        if (is_string($callback) and function_exists($callback)) {
            if (!isset(self::$hooks[$hook_name])) {
                self::$hooks[$hook_name] = array();
            }
            self::$hooks[$hook_name][] = $callback;
        } else {
            Event::listen($hook_name, $callback);
        }
    }