本文整理汇总了PHP中StubManager::processArgList方法的典型用法代码示例。如果您正苦于以下问题:PHP StubManager::processArgList方法的具体用法?PHP StubManager::processArgList怎么用?PHP StubManager::processArgList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StubManager
的用法示例。
在下文中一共展示了StubManager::processArgList方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mg_gravatar
/**
* {{#gravatar: email_p1=John.Smith | email_p2=gmail.com [|optional parameters] }}
*/
public function mg_gravatar(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
$output = $this->renderEntry($liste);
return array($output, 'noparse' => true, 'isHTML' => true);
}
示例2: mg_removeactions
/**
List of actions to remove from the current page.
*/
public function mg_removeactions(&$parser)
{
$params = StubManager::processArgList(func_get_args(), true);
if (isset($params)) {
foreach ($params as $actionToRemove) {
$this->actionsToRemove[] = $actionToRemove;
}
}
}
示例3: mg_quimble_poll
/**
* {{#quimble_poll: index=poll_index }}
*/
public function mg_quimble_poll(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
$code = $this->formatPoll($liste, $index, $output);
if ($code !== true) {
return $code;
}
return array($output, 'noparse' => true, 'isHTML' => true);
}
示例4: mg_jskitpoll
/**
* {{#jskitpoll(: [optional parameters] }}
*/
public function mg_jskitpoll(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
$output = $this->renderEntry($liste);
$output .= <<<EOT
\t<script src="http://js-kit.com/polls.js"></script>
EOT;
return array($output, 'noparse' => true, 'isHTML' => true);
}
示例5: mg_gcode
/**
{{#gcode: project=PROJECT NAME|file=FILENAME }}
*/
public function mg_gcode(&$parser)
{
$args = func_get_args();
$argv = StubManager::processArgList($args, true);
$project = @$argv['project'];
$file = @$argv['file'];
$result = $this->validateParameters($project, $file);
// don't bother going forward if we already have an error message
if (!empty($result)) {
return $result;
}
$code = $this->getCode($project, $file, $result);
// don't bother going forward if we already have an error message
if (!empty($result)) {
return $result;
}
return $code;
}
示例6: mg_jskitcomments
/**
* {{#jskitnavigator: [optional parameters] }}
*/
public function mg_jskitcomments(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
// check for ''noscript'' parameter
$noscript = false;
if (isset($liste['noscript'])) {
$r = strtolower($liste['noscript']);
if ($r == '1' || $r == 'true') {
$noscript = true;
}
}
$output = $this->renderEntry($liste);
if (!$noscript) {
if (!$this->scriptIncluded) {
$this->scriptIncluded = true;
$output .= $this->getScript();
}
}
return array($output, 'noparse' => true, 'isHTML' => true);
}
示例7: mg_jskitrating
/**
* {{#jskitrating: [optional parameters] }}
*/
public function mg_jskitrating(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
// check for ''noscript'' parameter
$noscript = false;
if (isset($liste['noscript'])) {
$r = strtolower($liste['noscript']);
if ($r == '1' || $r == 'true') {
$noscript = true;
}
}
$output = $this->renderEntry($liste);
if (!$noscript) {
if (!$this->scriptIncluded) {
$this->scriptIncluded = true;
$output .= <<<EOT
\t<script src="http://js-kit.com/ratings.js"></script>
EOT;
}
}
return array($output, 'noparse' => true, 'isHTML' => true);
}
示例8: mg_varaget
/**
Gets a variable to an array.
param 0: variable name
param 1: array key
*/
public function mg_varaget(&$parser)
{
$params = StubManager::processArgList(func_get_args(), true);
return @$this->pageVars[$params[0]][$params[1]];
}
示例9: mg_iconlink
/**
* Creates an 'icon link':
* Fetches a site's ''favicon.ico''
*
* {{#iconlink:
* [|site=url-of-page]
* [|domaincheck=y|n]
* [|target=target-text]
* [|content=anchor-text]
* [|alt=alternate-text]
* [|height=height-parameter]
* [|width=width-parameter]
* [|border=border-parameter]
* [|class=class-parameter]
* [|title=title-parameter]
* [|default=image-page-used-for-default]
* [|onchange=onchange-handler]
* [|onsubmit=onsubmit-handler]
* [|onreset=onreset-handler]
* [|onselect=onselect-handler]
* [|onblur=onblur-handler]
* [|onfocus=onfocus-handler]
* [|onkeydown=onkeydown-handler]
* [|onkeyup=onkeyup-handler]
* [|onkeypress=onkeypress-handler]
* [|onclick=onclick-handler]
* [|ondblclick=ondblclick-handler]
* [|onmousedown=onmousedown-handler]
* [|onmousemove=onmousemove-handler]
* [|onmouseout=onmouseout-handler]
* [|onmouseover=onmouseover-handler]
* [|onmouseup=onmouseup-handler]
* }}
*/
public function mg_iconlink(&$parser)
{
$params = func_get_args();
$liste = StubManager::processArgList($params, true);
$sliste = ExtHelper::doListSanitization($liste, self::$parametersIconLink);
if (empty($sliste)) {
return $this->getErrorMsg(self::codeListEmpty);
}
if (!is_array($sliste)) {
return $this->getErrorMsg(self::codeMissingParameter, $sliste);
}
ExtHelper::doSanitization($sliste, self::$parameters);
$result = ExtHelper::checkListForRestrictions($sliste, self::$parametersIconLink);
$title = $parser->mTitle;
// first check for restricted parameter usage
$check = $this->checkRestrictionStatus($title, $result);
if ($this->isError($check)) {
return $this->getErrorMsg($check, $result);
}
// Normalize domainCheck parameter
$site = $liste['site'];
$domainCheckParam = @$liste['domaincheck'];
$domainCheck = $this->extractBoolean($domainCheckParam);
$iconURL = $this->getFavicon($site, $domainCheck);
// Build the HTML element
$html = $this->buildHTMLfromList($sliste, self::$parametersIconLink, $iconURL);
if ($this->isError($html)) {
return $this->getErrorMsg($html);
}
return array($html, 'noparse' => true, 'isHTML' => true);
}