Split Task model into smaller classes

This commit is contained in:
Frédéric Guillot
2014-09-20 11:58:27 +02:00
parent 95e54d1d30
commit 5f96af82f2
16 changed files with 533 additions and 421 deletions

View File

@@ -8,6 +8,7 @@ use Core\Tool;
use Core\Translator;
use Model\Config;
use Model\Task;
use Model\TaskExport;
use Model\Notification;
$config = new Config($registry);
@@ -40,8 +41,8 @@ $cli->register('export-csv', function() use ($cli, $registry) {
$start_date = $GLOBALS['argv'][3];
$end_date = $GLOBALS['argv'][4];
$taskModel = new Task($registry);
$data = $taskModel->export($project_id, $start_date, $end_date);
$taskExport = new TaskExport($registry);
$data = $taskExport->export($project_id, $start_date, $end_date);
if (is_array($data)) {
Tool::csv($data);