Latte\Parser::setContentType PHP Method

setContentType() public method

public setContentType ( $type ) : static
return static
    public function setContentType($type)
    {
        if (in_array($type, [self::CONTENT_HTML, self::CONTENT_XHTML, self::CONTENT_XML], TRUE)) {
            $this->setContext(self::CONTEXT_HTML_TEXT);
            $this->xmlMode = $type === self::CONTENT_XML;
        } else {
            $this->setContext(self::CONTEXT_NONE);
        }
        return $this;
    }