當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。