渲染模板内容
@access public
@param string $content 模板内容
@param array $data 模板变量
@return void
972904
public function display($content, $data = []) {
        $this->content = $content;

        extract($data, EXTR_OVERWRITE);
        eval('?>' . $this->content);
    }
910766
public function write ($content)
	{
		$this->createPath($this->path);
		file_put_contents($this->getName(), $content, FILE_APPEND);
	}
668963
public function add($content)
    {
        // Load
        $json = $this->load();

        // Create JSON elements Array:
        foreach ($content["elements"] as $key => $value) {
            // delete columns and labels of irre-fields from elements
            if ($key == "columns" || $key == "labels") {
                foreach ($value as $index => $column) {
                    if (!$content["tca"][$index]["inlineParent"]) {
                        $contentColumns[] = $column;
                    } else {
                        unset($value[$index]);
                        unset($value[$index]);
                    }
                    if ($key === 'labels'
                        && empty($column)
                        && isset($json[$content['type']]['tca'][$content['elements']['columns'][$index]])
                    ) {
                        // If using a mask field with empty label, we have to set the "default" label
                        $label = '';
                        foreach ($json[$content['type']]['elements'] as $element) {
                            if (in_array($content['elements']['columns'][$index], $element['columns'], true)) {
                                $i = array_search($content['elements']['columns'][$index], $element['columns'], true);
                                if (!empty($element['labels'][$i])) {
                                    $label = $element['labels'][$i];
                                    break;
                                }
                            }
                        }
                        $value[$index] = $label;
                    }
                }
            }
            $json[$content["type"]]["elements"][$content["elements"]["key"]][$key] = $value;
        }

        $contentColumns = array();
        $columns = array();

        // delete columns and labels of irre-fields from elements
        if ($content["elements"]["columns"]) {
            foreach ($content["elements"]["columns"] as $index => $column) {
                if (!$content["tca"][$index]["inlineParent"]) {
                    $contentColumns[] = $column;
                } else {
                    unset($content["elements"]["columns"][$index]);
                    unset($content["elements"]["labels"][$index]);
                }
                $columns[] = $column;
            }
        }

        // Create JSON sql Array:
        if (is_array($content["sql"])) {
            foreach ($content["sql"] as $table => $sqlArray) {
                foreach ($sqlArray as $index => $type) {
                    $fieldname = "tx_mask_" . $columns[$index];
                    $json[$table]["sql"][$fieldname][$table][$fieldname] = $type;
                }
            }
        }

        // Create JSON tca Array:
        if (is_array($content["tca"])) {


            foreach ($content["tca"] as $key => $value) {
                $inlineField = false;

                // if this field is inline-field
                if ($value["inlineParent"]) {
                    $type = $value["inlineParent"];
                    $inlineField = true;
                } else {
                    $type = $content["type"];
                }

                $json[$type]["tca"][$columns[$key]] = $value;

                // add rte flag if inline and rte
                if ($inlineField) {
                    if ($content["elements"]["options"][$key] == "rte") {
                        $json[$type]["tca"][$columns[$key]]["rte"] = "1";
                    }
                }

                // Only add columns to elements if it is no inlinefield
                if (!$inlineField) {
                    $json[$type]["elements"][$content["elements"]["key"]]["columns"][$key] = "tx_mask_" . $columns[$key];
                }
                $json[$type]["tca"]["tx_mask_" . $columns[$key]] = $json[$type]["tca"][$columns[$key]];
                $json[$type]["tca"]["tx_mask_" . $columns[$key]]["key"] = $columns[$key];

                if ($inlineField) {
                    $json[$type]["tca"]["tx_mask_" . $columns[$key]]["order"] = $key;
                }

                unset($json[$type]["tca"][$columns[$key]]);
            }
        }

        // sort content elements by key before saving
        $this->sortJson($json);
        $this->write($json);
    }
509714
public function setContent($content)
    {
        if (!is_string($content)) {
            throw new TypeException('$content must be of type string.');
        }
        if (!$this->isBase64($content)) {
            $this->content = base64_encode($content);
        } else {
            $this->content = $content;
        }
    }
1117008
private function  sendContentString($content = '', Request $request)
    {
        $response = $request->getResponse();
        $response->setContent($content);
        $response->send();
    }
224910
public function SetContent(Content $content)
    {
        $this->texts = array();
        $wordings = ContentWording::Schema()->FetchByContent(false, $content);
        foreach($wordings as $wording)
        {
            $prefix = Str::Replace('-', '.', $content->GetType());
            $this->texts[$prefix . '.' . $wording->GetPlaceholder()] = $wording->GetText();
        }
    }
148459
public function setContent($content)
    {
        if (!is_null($content)) {
            $content = (string) $content;
        }

        $this->content = $content;
        return $this;
    }
1245078
protected function processPhpTag(string &$content): void
    {
        $pattern = $this->getTagPattern('php' . preg_quote($this->endTag, '/') . '(.+?)' . preg_quote($this->startTag . '/php', '/'));
        $content = preg_replace_callback($pattern, function ($match) {
            return '<?php ' . $match[1] . ' ?>';
        }, $content);
    }
9076
protected function processBuildTime(string &$content): void
    {
        $pattern = $this->getTagPattern('build_time');
        $content = preg_replace_callback($pattern, function ($match) {
            return '<?php /*模板编译于' . date('Y-m-d H:i:s') . '*/ ?>';
        }, $content);
    }
1043383
public function setContent($content)
    {
        $this->contents = trim($content);

        $this->parsedContents = null;
        return $this;
    }
1293081
public function setContent($content)
    {
        $contentAttribute = $this->contentAttribute;
        if ($contentAttribute === false) {
            return;
        }
        if (is_array($contentAttribute)) {
            foreach ($contentAttribute as $key => $value) {
                $this->$value = $content[$key];
            }
            return;
        }
        $this->$contentAttribute = $content;
    }
1199560
public function setContent($content)
    {

        if ($content instanceof FileInterface) {
            $content = $content->load();
        }

        if (is_file($content) && is_readable($content)) {
            $content = file_get_contents($content);
        }

        $this->rawContent = $content;
        $this->parser->setContent($this->rawContent);
    }
1266097
protected function normalizeErrorResponse($content, $data = null)
    {
        if ($content instanceof Arrayable) {
            $content = $content->toArray();
        }

        if ( ! is_array($content)) {
            $content = [
                'message' => $content,
            ];
        }

        if (null !== $data) {
            $content['data'] = $data;
        }

        return $content;
    }
279521
protected function doWrite(string $data, int $offset, int $length)
    {
        $this->content = substr($this->content, 0, $offset)
                       . $data
                       . substr($this->content, $offset + $length);
    }
374422
private function executePlainRendering($content, $data)
    {
        $this->obFlushAndStar();

        extract($data);

        $filename = $this->createTmpFile($content);

        require $filename;

        @unlink($filename);

        return $this->obGetContent();
    }
1372197
public function setContent(string $content): void {
		if ($this->compiled) {
			throw new ViewException("Attempt to alter view after compilation.", ViewException::AFTER_COMPILE_ALTERATION);
		}
		
		// like the header above, $content might be a file or the
		// actual content
		
		$this->content = is_file($content)
			? file_get_contents($content)
			: $content;
	}
1007609
public function RenderHtml(&$Content, &$Data)
    {
        header('Content-Type: text/html');

        foreach ($Content as $key => $val) {

            $datum = isset($Data[$val['key']]) ? $Data[$val['key']] : null;
            $hasChild = isset($val['child']) ? true : false;

            $this->_Output .= $val['text'];

            if ($this->CustomRender !== null) {
                $this->CustomRender->RegisterFunction($val['key'], $val['param']);
                $this->_Output .= $this->CustomRender->Parse();
            }

            if ($val['param'] !== false) {
                if ($val['key'] === 'css') {
                    $this->tempCss .= $val['param'];
                }
                if ($val['key'] === 'js') {
                    $this->tempJs .= $val['param'];
                }

                if ($val['key'] === 'part') {
                    if ($val['param'] === 'css') {
                        $this->_Output .= $this->tempCss;
                    }
                    if ($val['param'] === 'js') {
                        $this->_Output .= $this->tempJs;
                    }
                }
            }

            if ($this->GetVarType($datum) === $this->STRINGS) {
                $this->_Output .= (string)$Data[$val['key']];
            } else if ($this->GetVarType($datum) === $this->NUMERIC) {
                $this->_Output .= (double)$Data[$val['key']];
            } else if ($this->GetVarType($datum) === $this->ARRAYS) {
                foreach ($datum as $k => $v) {
                    if (is_array($v)) {
                        //Numeric Array
                        $this->RenderHtml($val['child'], $v);
                    } else {
                        //Associative Arrays
                        $this->RenderHtml($val['child'], $datum);
                        break;
                    }
                }
            } else if ($this->GetVarType($datum) === $this->BOOLEANS) {
                if ($datum) {
                    $this->RenderHtml($val['child'], $datum);
                }
            } else if ($this->GetVarType($datum) === $this->OBJECTS) {
                if ($datum instanceof Parts) {
                    $datum->RegisterFunction($val['key'], $val['param']);
                    if ($datum->tags === $datum->fnName) {
                        //Append output
                        $this->_Output .= $datum->Parse();
                        //Append property
                        $this->tempCss .= $datum->pte->GetTempCss();
                        $this->tempJs .= $datum->pte->GetTempJs();
                    }
                }
            } else {
                if ($hasChild && $datum !== null) {
                    $this->RenderHtml($val['child'], $datum);
                }
            }
        }
        return $this->_Output;
    }