yiiapi/framework/vendors/htmlpurifier/standalone/HTMLPurifier/Printer/HTMLDefinition.php
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
{
/**
* @type HTMLPurifier_HTMLDefinition, for easy access
*/
protected $def;
/**
* @param HTMLPurifier_Config $config
* @return string
*/
public function render($config)
{
$ret = '';
$this->config =& $config;
$this->def = $config->getHTMLDefinition();
$ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
$ret .= $this->renderDoctype();
$ret .= $this->renderEnvironment();
$ret .= $this->renderContentSets();
$ret .= $this->renderInfo();
$ret .= $this->end('div');
return $ret;
}
/**
* Renders the Doctype table
* @return string
*/
protected function renderDoctype()
{
$doctype = $this->def->doctype;
$ret = '';
$ret .= $this->start('table');
$ret .= $this->element('caption', 'Doctype');
$ret .= $this->row('Name', $doctype->name);
$ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No');
$ret .= $this->row('Default Modules', implode($doctype->modules, ', '));
$ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', '));
$ret .= $this->end('table');
return $ret;
}
/**
* Renders environment table, which is miscellaneous info
* @return string
*/
protected function renderEnvironment()
{
$def = $this->def;
后面还有 264 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
