59 public function send( array $feed, $line ) {
62 $server = $parsed[
'host'];
63 $options = [
'serializer' =>
'none' ];
66 if ( isset( $parsed[
'port'] ) ) {
67 $server .=
":{$parsed['port']}";
69 if ( isset( $parsed[
'query'] ) ) {
70 parse_str( $parsed[
'query'], $options );
72 if ( isset( $parsed[
'pass'] ) ) {
73 $options[
'password'] = $parsed[
'pass'];
75 if ( isset( $parsed[
'path'] ) ) {
76 $channel = str_replace(
'/',
'.', ltrim( $parsed[
'path'],
'/' ) );
78 $pool = RedisConnectionPool::singleton( $options );
79 $conn = $pool->getConnection( $server );
80 if ( $conn !==
false ) {
81 $conn->publish( $channel, $line );