本文整理汇总了PHP中Tag::tag方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::tag方法的具体用法?PHP Tag::tag怎么用?PHP Tag::tag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tag
的用法示例。
在下文中一共展示了Tag::tag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_tag_id
public static function get_tag_id($tag)
{
$sql = sprintf("SELECT tag_id FROM tag WHERE tag='%s'", $tag);
$tag_id = db()->Get_Cell($sql);
if (!$tag_id) {
$new_tag = new Tag();
$new_tag->tag($tag);
$tag_id = $new_tag->insert();
}
return $tag_id;
}
示例2: paramTag
/**
* Constructor
*
* @param str text The contents of the tag
* @param str[] data Reference to doc comment data array
* @param RootDoc root The root object
*/
function paramTag($text, &$data, &$root)
{
$explode = preg_split('/[ \\t]+/', $text);
$type = array_shift($explode);
if ($type) {
$this->_var = trim(array_shift($explode), '$');
$data['parameters'][$this->_var]['type'] = $type;
$text = join(' ', $explode);
}
if ($text != '') {
parent::tag('@param', $this->_var . ' - ' . $text, $root);
} else {
parent::tag('@param', NULL, $root);
}
}
示例3: seeTag
/**
* Constructor
*
* @param str text The contents of the tag
* @param str[] data Reference to doc comment data array
* @param RootDoc root The root object
*/
function seeTag($text, &$data, &$root)
{
if (preg_match('/^<a href="(.+)">(.+)<\\/a>$/', $text, $matches)) {
$this->_link = $matches[1];
$text = $matches[2];
} elseif (preg_match('/^([^ ]+)([ \\t](.*))?$/', $text, $matches)) {
$this->_link = $matches[1];
if (isset($matches[3])) {
$text = $matches[3];
}
} else {
$this->_link = NULL;
}
parent::tag('@see', $text, $root);
}
示例4: inheritDocTag
/**
* Constructor
*
* @param str text The contents of the tag
* @param str[] data Reference to doc comment data array
* @param RootDoc root The root object
*/
function inheritDocTag($text, &$data, &$root)
{
parent::tag('@inheritDoc', $text, $root);
}
示例5: returnTag
/**
* Constructor
*
* @param str text The contents of the tag
* @param str[] data Reference to doc comment data array
* @param RootDoc root The root object
*/
function returnTag($text, &$data, &$root)
{
$explode = preg_split('/[ \\t]+/', $text);
$data['return'] = array_shift($explode);
parent::tag('@return', join(' ', $explode), $root);
}