duxet/laravel-realtime

View on GitHub
src/Connections/NullConnection.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php namespace duxet\Realtime\Connections; 

use Closure;
use duxet\Realtime\Contracts\Connection as ConnectionContract;

class NullConnection implements ConnectionContract {

    /**
     * Publish new message on given channel.
     *
     * @param  string $channel
     * @param  mixed $message
     * @return bool
     */
    public function publish($channel, $message)
    {
        return true;
    }

    /**
     * Subscribe to given channel.
     *
     * @param  string $channel
     * @param  Closure $callback
     * @return void
     */
    public function subscribe($channel, Closure $callback) {}

}