Code Refactored

Summary: Code Refactored as suggested by epriestley

Test Plan: Same test plan as of Installation & Uninstallation of Applications

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4740
This commit is contained in:
Afaque Hussain
2013-01-30 10:53:43 -08:00
committed by epriestley
parent bdecadfd11
commit cc95818384
3 changed files with 27 additions and 12 deletions

View File

@@ -227,6 +227,20 @@ abstract class PhabricatorApplication {
/* -( Application Management )--------------------------------------------- */
public static function getByClass($class_name) {
$selected = null;
$applications = PhabricatorApplication::getAllApplications();
foreach ($applications as $application) {
if (get_class($application) == $class_name) {
$selected = $application;
break;
}
}
return $selected;
}
public static function getAllApplications() {
$classes = id(new PhutilSymbolLoader())