2013-04-11 20:22:06 +02:00
|
|
|
<?php
|
|
|
|
|
2015-06-15 10:02:26 +02:00
|
|
|
abstract class ManiphestExcelFormat extends Phobject {
|
2013-04-11 20:22:06 +02:00
|
|
|
|
|
|
|
final public static function loadAllFormats() {
|
2015-07-07 14:34:30 +02:00
|
|
|
return id(new PhutilClassMapQuery())
|
2013-04-11 20:22:06 +02:00
|
|
|
->setAncestorClass(__CLASS__)
|
2015-07-07 14:34:30 +02:00
|
|
|
->setSortMethod('getOrder')
|
|
|
|
->execute();
|
2013-04-11 20:22:06 +02:00
|
|
|
}
|
|
|
|
|
2015-06-02 14:14:01 +02:00
|
|
|
abstract public function getName();
|
|
|
|
abstract public function getFileName();
|
2013-04-11 20:22:06 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
2015-06-02 14:14:01 +02:00
|
|
|
abstract public function buildWorkbook(
|
2013-04-11 20:22:06 +02:00
|
|
|
PHPExcel $workbook,
|
|
|
|
array $tasks,
|
|
|
|
array $handles,
|
|
|
|
PhabricatorUser $user);
|
|
|
|
|
|
|
|
}
|