public function setText(string $text)
    {
        if (strlen($text) == 0) {
            throw new LengthException("Empty token content");
        }
        $this->text = $text;
        return $this;
    }
public function setText(string $text)
    {
        if (strlen($text) == 0) {
            throw new LengthException("Empty token content");
        }
        $this->text = $text;
        return $this;
    }
public function setText ( string $ text ) { if ( strlen ( $ text ) == 0 ) { throw new LengthException ( "Empty token content" ) ; } $ this -> text = $ text ; return $ this ; }
Sets token text.

@param string $text
@return $this
Sets token text .