@param string $content

@return TemplateInterface
774552
public function loadFromString(string $content): TemplateInterface
    {
        $class = $this->generateTemplateCacheClass($content);

        return $this->compileAndSaveTemplate(
            $content,
            $this->resolveCacheTemplatePath($class),
            $class
        );
    }
449925
public function &setContent($content)
    {
        // Set element type by analyzing the element
        switch (true) {

            case ($content instanceof FormGroup):
                $this->type = 'group';
                break;

            case ($content instanceof ControlsCollectionInterface):
                $this->type = 'collection';
                break;

            case ($content instanceof AbstractForm):
                $this->type = 'control';
                break;

            case ($content instanceof AbstractHtml):
                $this->type = 'factory';
                break;

            default:
                $this->type = 'html';
        }

        $this->content = $content;

        return $content;
    }
53190
public function prepend($content)
    {
        // Require that the response be unlocked before changing it
        $this->requireUnlocked();

        $this->body = $content . $this->body;

        return $this;
    }
622230
public function setHtmlContent(string $content) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content = $content;

        return $this;
    }
875955
protected function renderElement($content = null)
    {
        // Get element parts
        $element    = $this->getElement();
        $attributes = $this->getAttributesAsString();

        // Create html
        $html = '<' . $element;
        if ($attributes) {
            $html .= $attributes;
        }

        // Create closing tag
        if (is_string($content)) {
            $html .= '>' . $content . '</' . $element;
        }
        $html .= $this->getClosingBracket();

        return $html;
    }
1032035
public function strip($content)
    {
        $handlers = new HandlerContainer();
        $handlers->setDefault(function(ShortcodeInterface $s) { return $s->getContent(); });
        $processor = new Processor(new RegexParser(), $handlers);

        return $processor->process($content);
    }
933839
public function after($content) {
    if (FALSE === (bool) $this) {
      return $this;
    }
    $me = $this->dom();
    $parent = $this->xparent()->dom();
    $new = $this->_contentToDom($content);
    if (isset($me->nextSibling)) {
      $parent->insertBefore($new, $me->nextSibling);
    }
    else {
      $parent->appendChild($new);
    }
    return $this;
  }
1211548
private function mountContent($content)
    {
        if ($this->extended || empty($content)) {
            //No blocks or text can exists outside parent template blocks
            return;
        }

        if (is_array($content)) {
            $plainContent = '';
            foreach ($content as $token) {
                $plainContent .= $token[HtmlTokenizer::TOKEN_CONTENT];
            }

            $content = $plainContent;
        }

        $matches = $this->compiler->getSyntax()->parseBlock($content);
        if (!empty($matches)) {
            $chunks = explode($matches[0], $content);

            //We expecting first chunk to be string (before block)
            $this->mountContent(array_shift($chunks));

            $this->mountBlock(
                $matches['name'],
                isset($matches['default']) ? $matches['default'] : ''
            );

            //Rest of content (after block)
            $this->mountContent(join($matches[0], $chunks));

            return;
        }

        if (is_string(end($this->nodes))) {
            $this->nodes[key($this->nodes)] .= $content;

            return;
        }

        $this->nodes[] = $content;
    }
808440
public function injectTemplateContent($content, $params)
    {
        return str_replace(
            array(
                '%__ERROR_TYPE__%',
                '%__ERROR_REFERENCE__%',
                '%__ERROR_MESSAGE__%',
                '%__ERROR_FILE__%',
                '%__ERROR_LINE__%'
            ),
            array_map('addslashes',array(
                $params['type'],
                $params['reference'],
                $params['message'],
                $params['file'],
                $params['line']
            )),
            $content
        );
    }
1261046
public function setContent($content)
    {
        if (null !== $content && !is_string($content) && !is_numeric($content) &&
            ! is_callable(array($content, '__toString'))) {
            throw new \Exception(sprintf(
                'The Response content must be a string or object implementing __toString(), "%s" given.',
                gettype($content)
            ));
        }

        $this->content = $content;

        return $this;
    }
1166837
public function set($content)
    {
        if (is_string($content))
            $content = explode(',', $content);

        if ( ! is_array($content))
            $content = (array) $content;

        $this->content = array_map(function ($keyword) {
            return $this->clean($keyword);
        }, $content);

        return $this;
    }
1249396
protected function formatContent($content)
    {
        if ($this->request->method == 'HEAD') {
            return (object) $this->headers;
        }

        if ($this->isXml()) {
            return json_decode($this->parseXml($content));
        }

        if ($this->isJson()) {
            return json_decode($content);
        }
    }
670803
public function appendHtmlContent(string $content) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content .= $content;

        return $this;
    }
621900
public function replace($content)
    {
        foreach ($this->hasChild as $name => $value) {
            $name = $this->placeholder($name);
            $this->blocks[$name] = $this->_replace($this->blocks[$name]);
        }

        return $this->_replace($content);
    }
1347009
public function send($content)
    {
        if (is_string($content)) {
            $this->clear();
            $this->response->getBody()->write($content);
        } else if ($content instanceof StreamInterface) {
            $this->response = $this->response->withBody($content);
        }

        return $this;
    }
665640
public function coreScriptFilter($content) {

        $attributes = [];

        $attributes["type"] = "text/javascript";

        $innerHTML = null !== $content ? implode("", ["\n", $content, "\n"]) : "";

        return static::coreHTMLElement("script", $innerHTML, $attributes);
    }
611189
public function setContent($content) : Response
    {
        if (is_resource($content)) {
            $body = new MessageBodyResource($content);
        } else {
            $body = new MessageBodyString($content);
        }

        return $this->setBody($body);
    }