configuration = $configuration; $this->tag = $tag; $config = array( 'host' => $this->configuration.get('hostname'), 'port' => $this->configuration.get('port'), // -1 if socket ); if ($this->configuration.exist('auth')) { $config['auth'] = array(); if ($this->configuration.exist('auth', 'username')) { $config['auth'][] = $this->configuration.get('auth', 'username'); } $config['auth'][] = $this->configuration.get('auth', 'password'); } $this->client = new \Redis($config); } public function push(event: \core\log\Event $event) : \core\log\Event { $this->client->rpush($tag->generate_id(), $event->display()); } } ?>