当前位置: 首页>>代码示例>>PHP>>正文


PHP PluginManager::instance方法代码示例

本文整理汇总了PHP中PluginManager::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginManager::instance方法的具体用法?PHP PluginManager::instance怎么用?PHP PluginManager::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginManager的用法示例。


在下文中一共展示了PluginManager::instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInstance

 /**
  * Singleton
  * @static
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:BackupTheBerlios,项目名称:nodin-svn,代码行数:11,代码来源:PluginManager.php

示例2: getInstance

 /**
  * Return existing instance of PluginManager, or create it.
  *
  * @return PluginManager instance.
  */
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:rros,项目名称:Shaarli,代码行数:12,代码来源:PluginManager.php

示例3: isAllowed

 /**
  * Return true if given project has the right to use this plugin.
  *
  * @param string $group_id
  *
  * @return bool
  */
 function isAllowed($group_id)
 {
     if (!isset($this->allowedForProject[$group_id])) {
         $this->allowed_for_project[$group_id] = PluginManager::instance()->isPluginAllowedForProject($this, $group_id);
     }
     return $this->allowed_for_project[$group_id];
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:14,代码来源:fulltextsearchPlugin.class.php

示例4: getInstance

 /**
  * The singleton pattern
  * @static
  * @return IssueCache
  */
 public static function getInstance()
 {
     if (NULL == self::$instance) {
         self::$instance = new PluginManager();
     }
     return self::$instance;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:12,代码来源:PluginManager.class.php

示例5: activatePlugins

 public function activatePlugins()
 {
     $this->activatePlugin('docman');
     PluginManager::instance()->invalidateCache();
     PluginManager::instance()->loadPlugins();
     return $this;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:TestDataBuilder.php

示例6: PluginsAdministrationViews

 function PluginsAdministrationViews(&$controler, $view = null)
 {
     $this->View($controler, $view);
     $this->plugin_manager = PluginManager::instance();
     $this->dependency_solver = new PluginDependencySolver($this->plugin_manager);
     $this->renderer = TemplateRendererFactory::build()->getRenderer(PLUGINSADMINISTRATION_TEMPLATE_DIR);
 }
开发者ID:ranjanasim,项目名称:tuleap,代码行数:7,代码来源:PluginsAdministrationViews.class.php

示例7: instance

 public static function instance()
 {
     if (!self::$instance) {
         self::$instance = new PluginManager(PluginFactory::instance(), EventManager::instance(), new SiteCache());
     }
     return self::$instance;
 }
开发者ID:ranjanasim,项目名称:tuleap,代码行数:7,代码来源:PluginManager.class.php

示例8: __construct

 public function __construct(EventManager $event_manager)
 {
     $this->event_manager = $event_manager;
     $this->renderer = TemplateRendererFactory::build()->getRenderer(array(ForgeConfig::get('codendi_dir') . '/src/templates/search'));
     $this->search_types = array(Search_SearchTrackerV3::NAME => new Search_SearchTrackerV3(new ArtifactDao()), Search_SearchProject::NAME => new Search_SearchProject(new ProjectDao()), Search_SearchPeople::NAME => new Search_SearchPeople(UserManager::instance()), Search_SearchForum::NAME => new Search_SearchForum(new ForumDao()), Search_SearchSnippet::NAME => new Search_SearchSnippet(new SnippetDao()), Search_SearchWiki::NAME => new Search_SearchWiki(new WikiDao()));
     $this->plugin_manager = PluginManager::instance();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchController.class.php

示例9: instance

 public static function instance()
 {
     if (!self::$instance) {
         self::$instance = new PluginManager(PluginFactory::instance(), EventManager::instance(), new SiteCache(), new ForgeUpgradeConfig(new System_Command()));
     }
     return self::$instance;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:PluginManager.class.php

示例10: container

 public function container()
 {
     $id = URI::instance()->segment(3, false);
     $p = ORM::factory('plugin_instance', $id);
     if ($p->loaded) {
         echo PluginManager::instance()->get_plugin($p)->render();
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:8,代码来源:plug.php

示例11: instance

 public static function instance($dir = false)
 {
     //var_dump(self::$instance);
     if (self::$instance == false) {
         self::$instance = new PluginManager($dir);
     }
     return self::$instance;
 }
开发者ID:jotavejv,项目名称:CMS,代码行数:8,代码来源:plugins_helper.php

示例12: getInstance

 static function getInstance()
 {
     if (!self::$instance) {
         $plugin = self::$instance = new PluginManager();
         $plugin->loadPlugins();
     }
     return self::$instance;
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:8,代码来源:pluginmanager.class.php

示例13: instance

 /**
  * @return GitConfig
  */
 public static function instance()
 {
     if (!isset(self::$_instance)) {
         $plugin = PluginManager::instance()->getPluginByName('git');
         $driver = new GitDriver();
         self::$_instance = new GitConfig($plugin, $driver);
     }
     return self::$_instance;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:GitConfig.class.php

示例14: process

 public function process(HTTPRequest $request)
 {
     if (!PluginManager::instance()->isPluginAllowedForProject($this, $request->getProject()->getId())) {
         $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_svn_manage_repository', 'plugin_not_activated'));
         $GLOBALS['Response']->redirect('/projects/' . $request->getProject()->getUnixNameMixedCase() . '/');
     } else {
         $this->getRouter()->route($request);
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:9,代码来源:svnPlugin.class.php

示例15: isRestricted

 /**
  * Say if the service is restricted
  *
  * @param Project $project
  *
  * @return bool
  */
 public function isRestricted()
 {
     $plugin_manager = PluginManager::instance();
     $p = $plugin_manager->getPluginByName('tracker');
     if ($p && $plugin_manager->isProjectPluginRestricted($p)) {
         return true;
     }
     return false;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:16,代码来源:ServiceTracker.class.php


注:本文中的PluginManager::instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。