mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 19:52:44 +01:00
f695dcea9e
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
35 lines
755 B
PHP
35 lines
755 B
PHP
<?php
|
|
|
|
abstract class ManiphestExcelFormat extends Phobject {
|
|
|
|
final public static function loadAllFormats() {
|
|
return id(new PhutilClassMapQuery())
|
|
->setAncestorClass(__CLASS__)
|
|
->setSortMethod('getOrder')
|
|
->execute();
|
|
}
|
|
|
|
abstract public function getName();
|
|
abstract public function getFileName();
|
|
|
|
public function getOrder() {
|
|
return 0;
|
|
}
|
|
|
|
protected function computeExcelDate($epoch) {
|
|
$seconds_per_day = (60 * 60 * 24);
|
|
$offset = ($seconds_per_day * 25569);
|
|
|
|
return ($epoch + $offset) / $seconds_per_day;
|
|
}
|
|
|
|
/**
|
|
* @phutil-external-symbol class PHPExcel
|
|
*/
|
|
abstract public function buildWorkbook(
|
|
PHPExcel $workbook,
|
|
array $tasks,
|
|
array $handles,
|
|
PhabricatorUser $user);
|
|
|
|
}
|