本文整理汇总了PHP中StubManager类的典型用法代码示例。如果您正苦于以下问题:PHP StubManager类的具体用法?PHP StubManager怎么用?PHP StubManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StubManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:clrh,项目名称:mediawiki,代码行数:10,代码来源:Gravatar.body.php
示例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;
}
}
}
开发者ID:clrh,项目名称:mediawiki,代码行数:12,代码来源:SkinTools.body.php
示例3: 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);
}
开发者ID:clrh,项目名称:mediawiki,代码行数:13,代码来源:JSKitPoll.body.php
示例4: 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);
}
开发者ID:clrh,项目名称:mediawiki,代码行数:13,代码来源:Quimble.body.php
示例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;
}
开发者ID:clrh,项目名称:mediawiki,代码行数:21,代码来源:GoogleCode.body.php
示例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);
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:24,代码来源:JSKitComments.body.php
示例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);
}
开发者ID:clrh,项目名称:mediawiki,代码行数:26,代码来源:JSKitRating.body.php
示例8: array
<?php
/**
* @author Jean-Lou Dupont
* @package JSKitNavigator
* @version @@package-version@@
* @Id $Id$
*/
//<source lang=php>
if (!class_exists('StubManager')) {
echo '[[Extension:JSKitNavigator]] <b>requires</b> [[Extension:StubManager]] version >= 1.1.0' . "\n";
} else {
$wgExtensionCredits['other'][] = array('name' => 'JSKitNavigator', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:JSKitNavigator', 'description' => "Provides integration with JSKit Navigator tool.");
StubManager::createStub2(array('class' => 'JSKitNavigator', 'classfilename' => dirname(__FILE__) . '/JSKitNavigator.body.php', 'mgs' => array('jskitnavigator')));
}
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:16,代码来源:JSKitNavigator.php
示例9: array
<?php
/**
* @author Jean-Lou Dupont
* @package SecureTransclusion
* @version @@package-version@@
* @Id $Id$
*/
//<source lang=php>
if (!class_exists('StubManager')) {
echo '[[Extension:SecureTransclusion]] <b>requires</b> [[Extension:StubManager]]' . "\n";
} else {
$wgExtensionCredits['other'][] = array('name' => 'SecureTransclusion', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:SecureTransclusion', 'description' => "Provides secure interwiki transclusion.");
StubManager::createStub2(array('class' => 'SecureTransclusion', 'classfilename' => dirname(__FILE__) . '/SecureTransclusion.body.php', 'mgs' => array('strans')));
}
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:16,代码来源:SecureTransclusion.php
示例10: SVN
|name = AutoRedirect_stub
|status = beta
|type = parser
|author = [[user:jldupont|Jean-Lou Dupont]]
|image =
|version = See SVN ($Id$)
|update =
|mediawiki = tested on 1.10 but probably works with a earlier versions
|download = [http://bizzwiki.googlecode.com/svn/trunk/BizzWiki/extensions/XYZ/ SVN]
|readme =
|changelog =
|description =
|parameters =
|rights =
|example =
}}
<!--@@
== File Status ==
This section is only valid when viewing the page in a BizzWiki environment.
<code>(($#extractmtime|@@mtime@@$)) (($#extractfile|@@file@@$))</code>
Status: (($#comparemtime|<b>File system copy is newer - [{{fullurl:{{NAMESPACE}}:{{PAGENAME}}|action=reload}} Reload] </b>|Up to date$))
@@-->
== Notes ==
See details about this extension on [[Extension:AutoRedirect]].
== Code ==
<!--</wikitext>--><source lang=php>*/
StubManager::createStub2(array('class' => 'AutoRedirect', 'classfilename' => dirname(__FILE__) . '/AutoRedirect.php', 'mgs' => array('autoredirect')));
//</source>
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:31,代码来源:AutoRedirect_stub.php
示例11: MWException
case 10:
return $obj->$method( $args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7], $args[8], $args[9] );
case 11:
return $obj->$method( $args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7], $args[8], $args[9], $args[10] );
case 12:
return $obj->$method( $args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7], $args[8], $args[9], $args[10], $args[11] );
}
throw new MWException( __CLASS__.": too many arguments to method called in ".__METHOD__ );
*/
return call_user_func_array(array($obj, $method), $args);
}
}
// end class Stub
// Perform auto-discovery of [[Extension:ExtensionManager]]
// --------------------------------------------------------
StubManager::$edir = realpath(dirname(dirname(__FILE__)));
if (file_exists(StubManager::$edir . '/ExtensionManager/ExtensionManager.php')) {
include StubManager::$edir . '/ExtensionManager/ExtensionManager.php';
}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// ExtHelper Class
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/**
* Some helper functions for extensions
*/
class ExtHelper
{
/**
* Retrieves the specified list of parameters from the list.
* Uses the ''l'' parameter from the reference list.
*/
开发者ID:clrh,项目名称:mediawiki,代码行数:31,代码来源:StubManager.php
示例12: array
<?php
/**
* @author Jean-Lou Dupont
* @package ManageNamespaces
* @version @@package-version@@
* @Id $Id$
*/
// <source lang=php>
if (class_exists('StubManager')) {
$wgExtensionCredits['other'][] = array('name' => 'ManageNamespaces', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:ManageNamespaces', 'description' => "Provides a special page to add/remove namespaces. ");
StubManager::createStub2(array('class' => 'ManageNamespaces', 'classfilename' => dirname(__FILE__) . '/ManageNamespaces.body.php', 'i18nfilename' => dirname(__FILE__) . '/ManageNamespaces.i18n.php', 'logging' => true, 'hooks' => array('ParserAfterTidy'), 'nss' => array(NS_MEDIAWIKI), 'mgs' => array('mns')));
} else {
echo "Extension:ManageNamespaces <b>requires</b> Extension:StubManager\n";
}
global $wgCanonicalNamespaceNames;
global $wgExtraNamespaces;
global $wgNamespacesWithSubpages;
global $bwManagedNamespaces;
global $bwManagedNamespacesDefines;
// Now include the managed namespaces in question
include dirname(__FILE__) . '/ManageNamespaces.namespaces.php';
// Is the Namespace class defined yet?
if (!class_exists('Namespace') && !empty($bwManagedNamespaces)) {
require $IP . '/includes/Namespace.php';
}
// Go through all the managed namespaces
if (!empty($bwManagedNamespaces)) {
foreach ($bwManagedNamespaces as $index => $name) {
// add the managed namespaces to the primary tables
$wgCanonicalNamespaceNames[$index] = $name;
开发者ID:clrh,项目名称:mediawiki,代码行数:31,代码来源:ManageNamespaces.php
示例13: array
<?php
/**
* @author Jean-Lou Dupont
* @package ParserExt
* @subpackage SkinTools
* @version @@package-version@@
* @Id $Id$
*/
//<source lang=php>
global $wgExtensionCredits;
$wgExtensionCredits['other'][] = array('name' => 'SkinTools', 'version' => '1.1.0', 'author' => 'Jean-Lou Dupont', 'description' => 'Provides skin level functions', 'url' => 'http://mediawiki.org/wiki/Extension:SkinTools');
StubManager::createStub2(array('class' => 'SkinTools', 'classfilename' => dirname(__FILE__) . '/SkinTools.body.php', 'hooks' => array('SkinTemplateTabs'), 'mgs' => array('clearactions', 'removeactions', 'addaction')));
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:14,代码来源:SkinTools.php
示例14: array
<?php
/**
* @author Jean-Lou Dupont
* @package PageSidebar
* @version $Id$
*/
//<source lang=php>
if (!class_exists('StubManager')) {
echo '[[Extension:PageSidebar]] <b>requires</b> [[Extension:StubManager]]' . "\n";
} else {
global $wgExtensionCredits;
$wgExtensionCredits['other'][] = array('name' => 'PageSidebar', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:PageSidebar', 'description' => "Provides per-page arbitrary wikitext for the sidebar.");
StubManager::createStub2(array('class' => 'PageSidebar', 'classfilename' => dirname(__FILE__) . '/PageSidebar.body.php', 'hooks' => array('SkinTemplateOutputPageBeforeExec', 'OutputPageParserOutput', 'PageSidebar'), 'tags' => array('pagesidebar')));
}
// </source>
开发者ID:clrh,项目名称:mediawiki,代码行数:16,代码来源:PageSidebar.php
示例15: require
* Download & Install [[Extension:PageFunctions]] extension
* Download & Install [[Extension:ParserPhase2]] extension
* Dowload all this extension's files and place in the desired directory
* Apply the following changes to 'LocalSettings.php' after the statements of [[Extension:StubManager]]:
<source lang=php>
require('extensions/ScriptingTools/ScriptingTools_stub.php');
</source>
== HISTORY ==
== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].
== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[ScriptingTools::thisType][] = array('name' => ScriptingTools::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Provides an interface between MediaWiki scripting tools', 'url' => 'http://mediawiki.org/wiki/Extension:ScriptingTools');
class ScriptingTools
{
const thisName = 'ScriptingTools';
const thisType = 'other';
static $magicWord = '__jsminandstore__';
static $patterns = array('/<javascript(?:.*)\\>(.*)(?:\\<.?javascript>)/siU', '/<js(?:.*)\\>(.*)(?:\\<.?js>)/siU');
const open_js = '<script type= "text/javascript">/*<![CDATA[*/';
const close_js = '/*]]>*/</script>';
// relative directory from MediaWiki installation.
static $base = 'BizzWiki/scripts/';
public function __construct()
{
// take on global setting, if present.
global $bwScriptsDirectory;
if (isset($bwScriptsDirectory)) {
开发者ID:clrh,项目名称:mediawiki,代码行数:31,代码来源:ScriptingTools.php
示例16: array
<?php
/**
* @author Jean-Lou Dupont
* @package SmartyAdaptor
* @version @@package-version@@
* @Id $Id$
*/
//<source lang=php>
if (!class_exists('StubManager') || version_compare(StubManager::version(), '1.2.0', '<')) {
echo "<a href='http://mediawiki.org/wiki/Extension:SmartyAdaptor'/> <b>requires</b> <a href='http://mediawiki.org/wiki/Extension:StubManager'/>";
} else {
$wgExtensionCredits['other'][] = array('name' => 'SmartyAdaptor', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:SmartyAdaptor', 'description' => "Provides interface to Smarty [http://smarty.net Smarty Template Engine]. ");
StubManager::createStub2(array('class' => 'SmartyAdaptor', 'classfilename' => dirname(__FILE__) . '/SmartyAdaptor.body.php', 'hooks' => array('smarty', 'smarty_direct', 'SpecialVersionExtensionTypes')));
}
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:16,代码来源:SmartyAdaptor.php
示例17: dirname
<?php
/**
* @author Jean-Lou Dupont
* @package HNP
*/
//<source lang=php>
#require 'HNP.i18n.php';
global $IP;
require_once $IP . '/includes/ObjectCache.php';
require_once $IP . '/includes/BagOStuff.php';
if (class_exists('StubManager')) {
StubManager::createStub2(array('class' => 'HNP', 'classfilename' => dirname(__FILE__) . '/HNP.body.php', 'hooks' => array('userCan', 'UserIsAllowed', 'ArticleSave', 'SpecialVersionExtensionTypes', 'EditFormPreloadText'), 'mgs' => array('hnp', 'hnp_r', 'hnp_h')));
global $wgExtensionCredits;
$wgExtensionCredits['other'][] = array('name' => 'HNP', 'version' => '1.0.1', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:HierarchicalNamespacePermissions2', 'description' => "Provides enhancements to the permission management sub-system.");
} else {
echo 'Extension:HNP <b>requires</b> [[Extension:StubManager]]' . "\n";
}
//</source>
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:19,代码来源:HNP.php
示例18: require
<code>(($#extractmtime|@@mtime@@$)) (($#extractfile|@@file@@$))</code>
Status: (($#comparemtime|<b>File system copy is newer - [{{fullurl:{{NAMESPACE}}:{{PAGENAME}}|action=reload}} Reload] </b>|Up to date$))
@@-->
== Purpose==
== Features ==
== Dependancy ==
* [[Extension:StubManager|StubManager extension]]
== Installation ==
To install independantly from BizzWiki:
* Download 'StubManager' extension
* Apply the following changes to 'LocalSettings.php'
<source lang=php>
require('extensions/StubManager.php');
require('extensions/DirectoryManager/DirectoryManager_stub.php');
</source>
== History ==
== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].
== Code ==
<!--</wikitext>--><source lang=php>*/
StubManager::createStub2(array('class' => 'DirectoryManager', 'classfilename' => dirname(__FILE__) . '/DirectoryManager.php', 'hooks' => array('ArticleFromTitle', 'CustomEditor'), 'nss' => array(NS_DIRECTORY), 'mgs' => array('directory')));
//</source>
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:31,代码来源:DirectoryManager_stub.php
示例19: array
<?php
/**
* @author Jean-Lou Dupont
* @package NewUserEmailNotification.php
* @version $Id$
*/
//<source lang=php>
global $wgExtensionCredits;
$wgExtensionCredits['other'][] = array('name' => 'NewUserEmailNotification', 'version' => '1.0.0', 'author' => 'Jean-Lou Dupont', 'description' => 'Provides email notification of new user account creation', 'url' => 'http://mediawiki.org/wiki/Extension:NewUserEmailNotification');
StubManager::createStub('NewUserEmailNotification', dirname(__FILE__) . '/NewUserEmailNotification.body.php', dirname(__FILE__) . '/NewUserEmailNotification.i18n.php', array('AddNewAccount'), false);
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:12,代码来源:NewUserEmailNotification.php
示例20: array
<?php
/**
* @author Jean-Lou Dupont
* @package ProgressBar
* @version @@package-version@@
* @Id $Id$
*/
//<source lang=php>
if (!class_exists('StubManager')) {
echo '[[Extension:ProgressBar]] <b>requires</b> [[Extension:StubManager]] version >= 1.1.0' . "\n";
} else {
$wgExtensionCredits['other'][] = array('name' => 'ProgressBar', 'version' => '@@package-version@@', 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:ProgressBar', 'description' => "Provides customizable progress bars.");
StubManager::createStub2(array('class' => 'ProgressBar', 'classfilename' => dirname(__FILE__) . '/ProgressBar.body.php', 'mgs' => array('progressbar')));
}
//</source>
开发者ID:clrh,项目名称:mediawiki,代码行数:16,代码来源:ProgressBar.php
注:本文中的StubManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论