(non-PHPdoc)
@see JBBCode.Node::getAsText()

Returns the element as text (not including any bbcode markup)

@return the plain text representation of this node
13071
public function getAsText() {
        $s = "";
        foreach($this->getChildren() as $child)
            $s .= $child->getAsText();
        return $s;
    }
302393
public function getTextToSemicolon()
    {
        $buffer = null;

        while (($nextToken = $this->getNext()) !== null) {
            if ($nextToken == ';') {
                return $buffer;
            }

            $buffer .= $this->getCurrentText();
        }

        // The semicolon wasn't found.
        return null;
    }
109439
public function getIndent() {
    /** @var ParentNode $this */
    $whitespace_token = $this->previousToken();
    if (empty($whitespace_token) || $whitespace_token->getType() !== T_WHITESPACE) {
      return '';
    }
    $nl = FormatterFactory::getDefaultFormatter()->getConfig('nl');
    $lines = explode($nl, $whitespace_token->getText());
    $last_line = end($lines);
    return $last_line;
  }
441726
public function getReceivedText()
    {
        if ($this->isUserMessage()) {
            return isset($this->message->text) ? $this->message->text : '';
        }

        return '';
    }
1357466
public String getAsText() {
        LocalDate value = (LocalDate) getValue();
        return (value != null ? value.toString(this.formatter) : "");
    }
1120073
public function parse(string $bbcode):string{

		// sanitize the input if needed
		if($this->options->sanitizeInput){
			$bbcode = $this->sanitizerInterface->sanitizeInput($bbcode);
		}

		// run the pre-parser
		if($this->options->preParse){
			$bbcode = $this->parserMiddleware->pre($bbcode);
		}

		// @todo: array < 2 elements causes a PREG_BACKTRACK_LIMIT_ERROR! (breaks match pattern)
		$singleTags = array_merge(['br', 'hr'], $this->outputInterface->getSingleTags());

		// close singletags: [br] -> [br][/br]
		$bbcode = preg_replace('#\[('.implode('|', $singleTags).')((?:\s|=)[^]]*)?]#is', '[$1$2][/$1]', $bbcode);

		// @todo: find non-singletags without a closing tag and close them (or convert the brackets to entities)

		// protect newlines
		$bbcode = str_replace(["\r", "\n"], ['', $this->options->placeholder_eol], $bbcode);
		// parse the bbcode
		$bbcode = $this->parseBBCode($bbcode);

		// run the post-parser
		if($this->options->postParse){
			$bbcode = $this->parserMiddleware->post($bbcode);
		}

		// replace the newline placeholders
		$bbcode = str_replace($this->options->placeholder_eol, $this->outputInterface->getEOL(), $bbcode);

		// run the sanitizer/html purifier/whatever as a final step
		if($this->options->sanitizeOutput){
			$bbcode = $this->sanitizerInterface->sanitizeOutput($bbcode);
		}

		return $bbcode;
	}
226395
private function convertToText(Element $topNode): string {
        if (empty($topNode)) {
            return '';
        }

        $list = [];
        foreach ($topNode->contents() as $child) {
            $list[] = trim($child->text());
        }

        return implode("\n\n", $list);
    }
986228
@Override
    public String getAsText() {
        DateMidnight value = (DateMidnight) getValue();
        return (value != null ? this.dateFormat.print(value) : "");
    }
1149943
@Override
    public String getAsText() {
        if (text == null) {
            DateFormat df = formats[formats.length - 1];
            Date date = (Date) getValue();
            text = df.format(date);
        }
        return text;
    }
1269294
public function text($newTextContent = null)
    {
        if (isset($newTextContent)) {
            $this->textContent = $this->nodeValue = $newTextContent;
        }

        return $this->textContent;
    }
776794
protected function _getPlainText()
    {
        if (empty($this->_properties['text'])) {
            return null;
        }

        //Loads the `BBCode` helper
        $BBCode = (new HelperRegistry(new View))->load('MeTools.BBCode');

        return trim(strip_tags($BBCode->remove($this->_properties['text'])));
    }
560778
protected function getText()
    {
        if ($this->value === null) {
            $text = $this->text;
        } elseif (is_array($this->value)) {
            $text = vsprintf($this->text, $this->value);
        } else {
            $text = sprintf($this->text, $this->value);
        }

        return $text;
    }
633701
public function getPayload()
	{
		$sJSON = json_encode($this->_getPayload(), defined('JSON_UNESCAPED_UNICODE') ? JSON_UNESCAPED_UNICODE : 0);
		if (!defined('JSON_UNESCAPED_UNICODE') && function_exists('mb_convert_encoding')) {
			$sJSON = preg_replace_callback(
				'~\\\\u([0-9a-f]{4})~i',
				create_function('$aMatches', 'return mb_convert_encoding(pack("H*", $aMatches[1]), "UTF-8", "UTF-16");'),
				$sJSON);
		}

		$sJSONPayload = str_replace(
			'"' . self::APPLE_RESERVED_NAMESPACE . '":[]',
			'"' . self::APPLE_RESERVED_NAMESPACE . '":{}',
			$sJSON
		);
		$nJSONPayloadLen = strlen($sJSONPayload);

		if ($nJSONPayloadLen > self::PAYLOAD_MAXIMUM_SIZE) {
			if ($this->_bAutoAdjustLongPayload) {
				$nMaxTextLen = $nTextLen = strlen($this->_sText) - ($nJSONPayloadLen - self::PAYLOAD_MAXIMUM_SIZE);
				if ($nMaxTextLen > 0) {
					while (strlen($this->_sText = mb_substr($this->_sText, 0, --$nTextLen, 'UTF-8')) > $nMaxTextLen);
					return $this->getPayload();
				} else {
					throw new ApnsPHP_Message_Exception(
						"JSON Payload is too long: {$nJSONPayloadLen} bytes. Maximum size is " .
						self::PAYLOAD_MAXIMUM_SIZE . " bytes. The message text can not be auto-adjusted."
					);
				}
			} else {
				throw new ApnsPHP_Message_Exception(
					"JSON Payload is too long: {$nJSONPayloadLen} bytes. Maximum size is " .
					self::PAYLOAD_MAXIMUM_SIZE . " bytes"
				);
			}
		}

		return $sJSONPayload;
	}
1286552
private function replaceTextWithCDATA()
    {
        $isCDATAelement = PHPTAL_Dom_Defs::getInstance()->isCDATAElementInHTML($this->getNamespaceURI(), $this->getLocalName());

        if (!$isCDATAelement) {
            return;
        }

        $valueEscaped = ''; // sometimes parser generates split text nodes. "normalisation" is needed.
        $value = '';
        foreach ($this->childNodes as $node) {
            // leave it alone if there is CDATA, comment, or anything else.
            if (!$node instanceof PHPTAL_Dom_Text) return;

            $value .= $node->getValue();
            $valueEscaped .= $node->getValueEscaped();

            $encoding = $node->getEncoding(); // encoding of all nodes is the same
        }

        // only add cdata if there are entities
        // and there's no ${structure} (because it may rely on cdata syntax)
        if (false === strpos($valueEscaped, '&') || preg_match('/<\?|\${structure/', $value)) {
            return;
        }

        $this->childNodes = array();

        // appendChild sets parent
        $this->appendChild(new PHPTAL_Dom_Text('/*', $encoding));
        $this->appendChild(new PHPTAL_Dom_CDATASection('*/'.$value.'/*', $encoding));
        $this->appendChild(new PHPTAL_Dom_Text('*/', $encoding));
    }
639553
private String getText(Element element) {
		try {
			for (int i = 0; i < element.getChildNodes().getLength(); i++) {
				Node node = element.getChildNodes().item(i);
				if (node.getNodeType() == Node.TEXT_NODE) {
					return node.getNodeValue();
				}
			}
		} catch (Exception e) {
		}
		return "";

	}
304113
@Override
    public String getAsText() {
        Object reflectiveArray = getValue();
        if (reflectiveArray == null) {
            return null;
        }
        // generic interface.
        java.beans.PropertyEditor cellPropertyEditor = PropertyEditorFinder.getInstance().find(this.cellType);

        int length = Array.getLength(reflectiveArray);
        String[] cellStringValues = new String[length];

        for (int index = 0; index < length; index++) {
            Object cellValue = Array.get(reflectiveArray, index);
            cellPropertyEditor.setValue(cellValue);
            cellStringValues[index]=cellPropertyEditor.getAsText();
        }

        return encode(cellStringValues);
    }
1001823
public function getPreviewHtml(BBcodeElementNodeInterface $el)
    {
        if (!$this->hasValidInputs($el)) {
            return $el->getAsBBCode();
        }

        $html = $this->getReplacementText();

        if ($this->usesOption()) {
            $options = $el->getAttribute();
            if (count($options) == 1) {
                $vals = array_values($options);
                $html = str_ireplace('{option}', reset($vals), $html);
            } else {
                foreach ($options as $key => $val) {
                    $html = str_ireplace('{' . $key . '}', $val, $html);
                }
            }
        }

        $content = $this->getPreviewContent($el);
        $html = str_ireplace('{param}', $content, $html);

        return $html;
    }