Elgg\Ajax\Service::__construct PHP Méthode

__construct() public méthode

Constructor
public __construct ( PluginHooksService $hooks, SystemMessagesService $msgs, Input $input, Elgg\Amd\Config $amdConfig )
$hooks Elgg\PluginHooksService Hooks service
$msgs Elgg\SystemMessagesService System messages service
$input Elgg\Http\Input Input service
$amdConfig Elgg\Amd\Config AMD config
    public function __construct(PluginHooksService $hooks, SystemMessagesService $msgs, Input $input, Config $amdConfig)
    {
        $this->hooks = $hooks;
        $this->msgs = $msgs;
        $this->input = $input;
        $this->amd_config = $amdConfig;
        if ($this->input->get('elgg_fetch_messages', true)) {
            $message_filter = [$this, 'appendMessages'];
            $this->hooks->registerHandler(AjaxResponse::RESPONSE_HOOK, 'all', $message_filter, 999);
        }
        if ($this->input->get('elgg_fetch_deps', true)) {
            $deps_filter = [$this, 'appendDeps'];
            $this->hooks->registerHandler(AjaxResponse::RESPONSE_HOOK, 'all', $deps_filter, 999);
        }
    }