本文整理汇总了PHP中HTML_Common::apiVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Common::apiVersion方法的具体用法?PHP HTML_Common::apiVersion怎么用?PHP HTML_Common::apiVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Common
的用法示例。
在下文中一共展示了HTML_Common::apiVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HTML_Table
/**
* Class constructor
* @param array $attributes Associative array of table tag attributes
* @param int $tabOffset
* @access public
*/
function HTML_Table($attributes = null, $tabOffset = 0)
{
$commonVersion = 1.7;
if (HTML_Common::apiVersion() < $commonVersion) {
return PEAR::raiseError("HTML_Table version " . $this->apiVersion() . " requires " . "HTML_Common version {$commonVersion} or greater.", 0, PEAR_ERROR_TRIGGER);
}
HTML_Common::HTML_Common($attributes, $tabOffset);
}
示例2: HTML_CSS
/**
* Class constructor
*
* @access public
*/
function HTML_CSS()
{
$commonVersion = 1.7;
if (HTML_Common::apiVersion() < $commonVersion) {
return PEAR::raiseError("HTML_CSS version " . $this->apiVersion() . " requires " . "HTML_Common version 1.2 or greater.", 0, PEAR_ERROR_TRIGGER);
}
}
示例3: HTML_Table
/**
* Class constructor
* @param array $attributes Associative array of table tag attributes
* @param int $tabOffset Tab offset of the table
* @param bool $useTGroups Whether to use <thead>, <tfoot> and
* <tbody> or not
* @access public
*/
function HTML_Table($attributes = null, $tabOffset = 0, $useTGroups = false)
{
$commonVersion = 1.7;
if (HTML_Common::apiVersion() < $commonVersion) {
return PEAR::raiseError('HTML_Table version ' . $this->apiVersion() . ' requires ' . "HTML_Common version {$commonVersion} or greater.", 0, PEAR_ERROR_TRIGGER);
}
HTML_Common::HTML_Common($attributes, (int) $tabOffset);
$this->_useTGroups = (bool) $useTGroups;
$this->_tbody = new HTML_Table_Storage($attributes, $tabOffset, $this->_useTGroups);
if ($this->_useTGroups) {
$this->_thead = new HTML_Table_Storage($attributes, $tabOffset, $this->_useTGroups);
$this->_tfoot = new HTML_Table_Storage($attributes, $tabOffset, $this->_useTGroups);
}
}
示例4: HTML_Page
/**
* Class constructor
* Possible attributes are:
* - general options:
* - "lineend" => "unix|win|mac" (Sets line ending style; defaults to unix.)
* - "tab" => string (Sets line ending style; defaults to \t.)
* - "cache" => "false|true"
* - "charset" => charset string (Sets charset encoding; defaults to utf-8)
* - "mime" => mime encoding string (Sets document mime type; defaults to text/html)
* - XHTML specific:
* - "doctype" => string (Sets XHTML doctype; defaults to XHTML 1.0 Transitional.)
* - "language" => two letter language designation. (Defines global document language; defaults to "en".)
* - "namespace" => string (Sets document namespace; defaults to the W3C defined namespace.)
*
* @param mixed $attributes Associative array of table tag attributes
* or HTML attributes name="value" pairs
* @access public
*/
function HTML_Page($attributes = array())
{
$commonVersion = 1.7;
if (HTML_Common::apiVersion() < $commonVersion) {
return PEAR::raiseError("HTML_Page version " . $this->apiVersion() . " requires " . "HTML_Common version 1.2 or greater.", 0, PEAR_ERROR_TRIGGER);
}
if ($attributes) {
$attributes = $this->_parseAttributes($attributes);
}
if (isset($attributes['lineend'])) {
$this->setLineEnd($attributes['lineend']);
}
if (isset($attributes['charset'])) {
$this->setCharset($attributes['charset']);
}
if (isset($attributes['doctype'])) {
if ($attributes['doctype'] == 'none') {
$this->_simple = true;
} elseif ($attributes['doctype']) {
$this->setDoctype($attributes['doctype']);
}
}
if (isset($attributes['language'])) {
$this->setLang($attributes['language']);
}
if (isset($attributes['mime'])) {
$this->setMimeEncoding($attributes['mime']);
}
if (isset($attributes['namespace'])) {
$this->setNamespace($attributes['namespace']);
}
if (isset($attributes['tab'])) {
$this->setTab($attributes['tab']);
}
if (isset($attributes['cache'])) {
$this->setCache($attributes['cache']);
}
}