public function listen( $channels )
    {
        $channels = is_array( $channels ) ? $channels : array( $channels );
        foreach( $channels as $channel ) {
            // clean up channel - it doesn't require quoting (not sure why)
            // make safe with whitelist of chars
            $channel = preg_replace( "/[^a-zA-Z\._:]/", '', $channel );
            $this->query( new Raw( "LISTEN {$channel}" ) );
        }
    }
public function listen( $channels )
    {
        $channels = is_array( $channels ) ? $channels : array( $channels );
        foreach( $channels as $channel ) {
            // clean up channel - it doesn't require quoting (not sure why)
            // make safe with whitelist of chars
            $channel = preg_replace( "/[^a-zA-Z\._:]/", '', $channel );
            $this->query( new Raw( "LISTEN {$channel}" ) );
        }
    }
public function listen ( $ channels ) { $ channels = is_array ( $ channels ) ? $ channels : array ( $ channels ) ; foreach ( $ channels as $ channel ) { // clean up channel - it doesn't require quoting (not sure why) // make safe with whitelist of chars $ channel = preg_replace ( "/[^a-zA-Z\._:]/" , '' , $ channel ) ; $ this -> query ( new Raw ( "LISTEN {$channel}" ) ) ; } }
Subscribe to a postgres channel
Subscribe to a postgres channel