當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhabricatorApplication::getAllApplications方法代碼示例

本文整理匯總了PHP中PhabricatorApplication::getAllApplications方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorApplication::getAllApplications方法的具體用法?PHP PhabricatorApplication::getAllApplications怎麽用?PHP PhabricatorApplication::getAllApplications使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhabricatorApplication的用法示例。


在下文中一共展示了PhabricatorApplication::getAllApplications方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getInUseMessage

 public function getInUseMessage()
 {
     $applications = PhabricatorApplication::getAllApplications();
     $applications = mpull($applications, null, 'getPHID');
     $application = idx($applications, $this->getApplicationPHID());
     if ($application) {
         $message = pht('The address %s is configured to be used by the %s Application.', $this->getAddress(), $application->getName());
     } else {
         $message = pht('The address %s is configured to be used by an application.', $this->getAddress());
     }
     return $message;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:12,代碼來源:PhabricatorMetaMTAApplicationEmail.php

示例2: getQuicksandURIPatternBlacklist

 private function getQuicksandURIPatternBlacklist()
 {
     $applications = PhabricatorApplication::getAllApplications();
     $blacklist = array();
     foreach ($applications as $application) {
         $blacklist[] = $application->getQuicksandURIPatternBlacklist();
     }
     return array_mergev($blacklist);
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:9,代碼來源:PhabricatorStandardPageView.php

示例3: loadPage

 public function loadPage()
 {
     $apps = PhabricatorApplication::getAllApplications();
     if ($this->classes) {
         $classes = array_fuse($this->classes);
         foreach ($apps as $key => $app) {
             if (empty($classes[get_class($app)])) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->phids) {
         $phids = array_fuse($this->phids);
         foreach ($apps as $key => $app) {
             if (empty($phids[$app->getPHID()])) {
                 unset($apps[$key]);
             }
         }
     }
     if (strlen($this->nameContains)) {
         foreach ($apps as $key => $app) {
             if (stripos($app->getName(), $this->nameContains) === false) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->installed !== null) {
         foreach ($apps as $key => $app) {
             if ($app->isInstalled() != $this->installed) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->beta !== null) {
         foreach ($apps as $key => $app) {
             if ($app->isBeta() != $this->beta) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->firstParty !== null) {
         foreach ($apps as $key => $app) {
             if ($app->isFirstParty() != $this->firstParty) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->unlisted !== null) {
         foreach ($apps as $key => $app) {
             if ($app->isUnlisted() != $this->unlisted) {
                 unset($apps[$key]);
             }
         }
     }
     if ($this->launchable !== null) {
         foreach ($apps as $key => $app) {
             if ($app->isLaunchable() != $this->launchable) {
                 unset($apps[$key]);
             }
         }
     }
     switch ($this->order) {
         case self::ORDER_NAME:
             $apps = msort($apps, 'getName');
             break;
         case self::ORDER_APPLICATION:
             $apps = $apps;
             break;
         default:
             throw new Exception(pht('Unknown order "%s"!', $this->order));
     }
     return $apps;
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:73,代碼來源:PhabricatorApplicationQuery.php

示例4: getDefaultObjectTypePolicyMap

 private static function getDefaultObjectTypePolicyMap()
 {
     static $map;
     if ($map === null) {
         $map = array();
         $apps = PhabricatorApplication::getAllApplications();
         foreach ($apps as $app) {
             $map += $app->getDefaultObjectTypePolicyMap();
         }
     }
     return $map;
 }
開發者ID:JohnnyEstilles,項目名稱:phabricator,代碼行數:12,代碼來源:PhabricatorPolicyQuery.php

示例5: getByClass

 public static function getByClass($class_name)
 {
     $selected = null;
     $applications = PhabricatorApplication::getAllApplications();
     foreach ($applications as $application) {
         if (get_class($application) == $class_name) {
             $selected = $application;
             break;
         }
     }
     if (!$selected) {
         throw new Exception("No application '{$class_name}'!");
     }
     return $selected;
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:15,代碼來源:PhabricatorApplication.php

示例6: testApplicationsInstalled

 public function testApplicationsInstalled()
 {
     $all = PhabricatorApplication::getAllApplications();
     $installed = PhabricatorApplication::getAllInstalledApplications();
     $this->assertEqual(count($all), count($installed), 'In test cases, all applications should default to installed.');
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:6,代碼來源:PhabricatorInfrastructureTestCase.php

示例7: testGetAllApplications

 public function testGetAllApplications()
 {
     PhabricatorApplication::getAllApplications();
     $this->assertTrue(true);
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:5,代碼來源:PhabricatorApplicationTestCase.php


注:本文中的PhabricatorApplication::getAllApplications方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。