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:
committed by
epriestley
parent
bdecadfd11
commit
cc95818384
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user