src/LineIO.php
public function push($line)
    {
        if ($this->socket === null) {
            throw new \Erebot\IllegalActionException('Uninitialized socket');
        }

        if (strcspn($line, "\r\n") != strlen($line)) {
            throw new \Erebot\InvalidValueException(
                'Line contains forbidden characters'
            );
        }
        $this->sndQueue[] = $line;
    }
public function push($line)
    {
        if ($this->socket === null) {
            throw new \Erebot\IllegalActionException('Uninitialized socket');
        }

        if (strcspn($line, "\r\n") != strlen($line)) {
            throw new \Erebot\InvalidValueException(
                'Line contains forbidden characters'
            );
        }
        $this->sndQueue[] = $line;
    }
public function push ( $ line ) { if ( $ this -> socket === null ) { throw new \ Erebot \ IllegalActionException ( 'Uninitialized socket' ) ; } if ( strcspn ( $ line , "\r\n" ) != strlen ( $ line ) ) { throw new \ Erebot \ InvalidValueException ( 'Line contains forbidden characters' ) ; } $ this -> sndQueue [ ] = $ line ; }
Adds a given line to the outgoing FIFO.

\param string $line
The line of text to send.

\throw Erebot::InvalidValueException
The $line contains invalid characters.
Adds a given line to the outgoing FIFO .