当前位置: 首页>>代码示例>>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;未经允许,请勿转载。