first commit
This commit is contained in:
86
libs/TaskwarriorCalendarEvent.php
Normal file
86
libs/TaskwarriorCalendarEvent.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace Aerex\Taskwarrior;
|
||||
|
||||
use Aerex\Taskwarrior\Config;
|
||||
use DavidBadura\Taskwarrior\Taskwarrior;
|
||||
use Sabre\VObject\Component\VCalendar;
|
||||
|
||||
class TaskwarriorCalendarEvent {
|
||||
|
||||
/**
|
||||
* @var Config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
*/
|
||||
private $taskrc;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
||||
private $taskDataDir;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
||||
private $taskBinFile;
|
||||
|
||||
|
||||
/**
|
||||
* @var Taskwarrior
|
||||
*/
|
||||
|
||||
private $taskwarrior;
|
||||
|
||||
|
||||
public function __construct(){
|
||||
$this->config = new Config();
|
||||
|
||||
if($this->config.isNotValidConfiguration()){
|
||||
$invalidConfigurationString = $this->config.invalidConfigurations();
|
||||
|
||||
$invalidConfigurationMessage = sprintf('The following configurations are invalid %s and' .
|
||||
' the default configurations will be used', $invalidConfigurationString);
|
||||
echo($invalidConfigurationMessage);
|
||||
|
||||
$this->config.setDefaults();
|
||||
}
|
||||
|
||||
$this->taskrc = $this->config->getTaskRC();
|
||||
$this->taskDataDir = $this->config->getTaskDataDir();
|
||||
$this->taskBinFile = $this->config->getTaskBinFile();
|
||||
|
||||
$this->taskwarrior = $taskwarrior($this->taskrc,$this->taskDataDir, [], $this->taskBinFile);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function buildCalendarEvent(VCalendar $vEvent){
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function buildToDoEvent(VCalendar $vToDo){
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user