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