src/LineIO.php
protected function getLine()
    {
        $pos = false;
        foreach ($this->eol as $eol) {
            $pos = strpos($this->incomingData, $eol);
            if ($pos !== false) {
                break;
            }
        }
        if ($pos === false) {
            return false;
        }

        $len    = strlen($eol);
        $line   = \Erebot\Utils::toUTF8(substr($this->incomingData, 0, $pos));
        $this->incomingData    = substr($this->incomingData, $pos + $len);
        $this->rcvQueue[]      = $line;

        $logger = \Plop\Plop::getInstance();
        $logger->debug(
            '%(line)s',
            array('line' => addcslashes($line, "\000..\037"))
        );
        return true;
    }
protected function getLine()
    {
        $pos = false;
        foreach ($this->eol as $eol) {
            $pos = strpos($this->incomingData, $eol);
            if ($pos !== false) {
                break;
            }
        }
        if ($pos === false) {
            return false;
        }

        $len    = strlen($eol);
        $line   = \Erebot\Utils::toUTF8(substr($this->incomingData, 0, $pos));
        $this->incomingData    = substr($this->incomingData, $pos + $len);
        $this->rcvQueue[]      = $line;

        $logger = \Plop\Plop::getInstance();
        $logger->debug(
            '%(line)s',
            array('line' => addcslashes($line, "\000..\037"))
        );
        return true;
    }
protected function getLine ( ) { $ pos = false ; foreach ( $ this -> eol as $ eol ) { $ pos = strpos ( $ this -> incomingData , $ eol ) ; if ( $ pos !== false ) { break ; } } if ( $ pos === false ) { return false ; } $ len = strlen ( $ eol ) ; $ line = \ Erebot \ Utils :: toUTF8 ( substr ( $ this -> incomingData , 0 , $ pos ) ) ; $ this -> incomingData = substr ( $ this -> incomingData , $ pos + $ len ) ; $ this -> rcvQueue [ ] = $ line ; $ logger = \ Plop \ Plop :: getInstance ( ) ; $ logger -> debug ( '%(line)s' , array ( 'line' => addcslashes ( $ line , "\000..\037" ) ) ) ; return true ; }
Retrieves a single line of text from the incoming buffer
and puts it in the incoming FIFO.

\retval true
Whether a line could be fetched from the buffer.

\retval false
... or not.

\note
Lines fetched by this method are always UTF-8 encoded.
Retrieves a single line of text from the incoming buffer and puts it in the incoming FIFO .