Gregwar\RST\Parser::prepareCode PHP 메소드

prepareCode() 보호된 메소드

Tells if the current buffer is announcing a block of code
protected prepareCode ( ) : boolean
리턴 boolean
    protected function prepareCode()
    {
        if (!$this->buffer) {
            return false;
        }
        $lastLine = trim($this->buffer[count($this->buffer) - 1]);
        if (strlen($lastLine) >= 2) {
            if (substr($lastLine, -2) == '::') {
                if (trim($lastLine) == '::') {
                    array_pop($this->buffer);
                } else {
                    $this->buffer[count($this->buffer) - 1] = substr($lastLine, 0, -1);
                }
                return true;
            }
        }
        return false;
    }