1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 08:06:13 +01:00
phorge-phorge/src/applications/maniphest/export/ManiphestExcelFormat.php

45 lines
947 B
PHP
Raw Normal View History

<?php
abstract class ManiphestExcelFormat {
final public static function loadAllFormats() {
$classes = id(new PhutilSymbolLoader())
->setAncestorClass(__CLASS__)
->setConcreteOnly(true)
->selectAndLoadSymbols();
$objects = array();
foreach ($classes as $class) {
$objects[$class['name']] = newv($class['name'], array());
}
$objects = msort($objects, 'getOrder');
return $objects;
}
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);
}