本文整理匯總了PHP中SimpleTag::getTagName方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleTag::getTagName方法的具體用法?PHP SimpleTag::getTagName怎麽用?PHP SimpleTag::getTagName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SimpleTag
的用法示例。
在下文中一共展示了SimpleTag::getTagName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: acceptTag
/**
* Adds a tag to the page.
* @param SimpleTag $tag Tag to accept.
* @access public
*/
protected function acceptTag($tag)
{
if ($tag->getTagName() == "a") {
$this->page->addLink($tag);
} elseif ($tag->getTagName() == "base") {
$this->page->setBase($tag->getAttribute('href'));
} elseif ($tag->getTagName() == "title") {
$this->page->setTitle($tag);
} elseif ($this->isFormElement($tag->getTagName())) {
for ($i = 0; $i < count($this->open_forms); $i++) {
$this->open_forms[$i]->addWidget($tag);
}
$this->last_widget = $tag;
}
}
示例2: acceptTag
/**
* Adds a tag to the page.
* @param SimpleTag $tag Tag to accept.
* @access public
*/
function acceptTag(&$tag)
{
if ($tag->getTagName() == "a") {
$this->_addLink($tag);
} elseif ($tag->getTagName() == "title") {
$this->_setTitle($tag);
} elseif ($this->_isFormElement($tag->getTagName())) {
for ($i = 0; $i < count($this->_open_forms); $i++) {
$this->_open_forms[$i]->addWidget($tag);
}
$this->_last_widget =& $tag;
}
}
示例3: acceptTag
/**
* Adds a tag to the page.
*
* @param SimpleTag $tag Tag to accept.
*/
public function acceptTag(&$tag)
{
if ($tag->getTagName() == 'a') {
$this->_addLink($tag);
} elseif ($tag->getTagName() == 'base') {
$this->_setBase($tag);
} elseif ($tag->getTagName() == 'title') {
$this->_setTitle($tag);
} elseif ($this->_isFormElement($tag->getTagName())) {
for ($i = 0; $i < count($this->_open_forms); ++$i) {
$this->_open_forms[$i]->addWidget($tag);
}
$this->_last_widget =& $tag;
}
}