1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 04:32:43 +01:00
phorge-phorge/src/applications/harbormaster/autoplan/HarbormasterBuildAutoplan.php
Joshua Spence f695dcea9e Use PhutilClassMapQuery
Summary: Use `PhutilClassMapQuery` where appropriate.

Test Plan: Browsed around the UI to verify things seemed somewhat working.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13429
2015-07-07 22:51:57 +10:00

19 lines
455 B
PHP

<?php
abstract class HarbormasterBuildAutoplan extends Phobject {
abstract public function getAutoplanPlanKey();
abstract public function getAutoplanName();
public static function getAutoplan($key) {
return idx(self::getAllAutoplans(), $key);
}
public static function getAllAutoplans() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
->setUniqueMethod('getAutoplanPlanKey')
->execute();
}
}