Toplan\PhpSms\Sms::reinstallHandlers PHP Method

reinstallHandlers() protected static method

Reinstall hooks` handlers for balancing task.
protected static reinstallHandlers ( array $handlers )
$handlers array
    protected static function reinstallHandlers(array $handlers)
    {
        $serializer = self::getSerializer();
        foreach ($handlers as $hookName => $serializedHandlers) {
            foreach ($serializedHandlers as $index => $handler) {
                if (is_string($handler)) {
                    $handler = $serializer->unserialize($handler);
                }
                self::$hookName($handler, $index === 0);
            }
        }
    }