src/broadcast/BaseMessage.php
public function send(BroadcastInterface $broadcast = null)
    {
        if ($broadcast === null && $this->broadcast === null) {
            $broadcast = Yii::$app->getBroadcast();
        } elseif ($broadcast === null) {
            $broadcast = $this->broadcast;
        }

        return $broadcast->send($this);
    }
public function send(BroadcastInterface $broadcast = null)
    {
        if ($broadcast === null && $this->broadcast === null) {
            $broadcast = Yii::$app->getBroadcast();
        } elseif ($broadcast === null) {
            $broadcast = $this->broadcast;
        }

        return $broadcast->send($this);
    }
public function send ( BroadcastInterface $ broadcast = null ) { if ( $ broadcast === null && $ this -> broadcast === null ) { $ broadcast = Yii :: $ app -> getBroadcast ( ) ; } elseif ( $ broadcast === null ) { $ broadcast = $ this -> broadcast ; } return $ broadcast -> send ( $ this ) ; }
Sends this broadcast message.
@param BroadcastInterface $broadcast the broadcast that should be used to send this message.
If no broadcast is given it will first check if [[broadcast]] is set and if not,
the "broadcast" application component will be used instead.
@return bool whether this message is sent successfully.
Sends this broadcast message .