add config

This commit is contained in:
DavidBadura
2015-04-07 21:23:48 +00:00
parent cc02f7aa60
commit 081e90ede2
3 changed files with 140 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ class Taskwarrior
*/
private $version;
/**
* @var Config
*/
private $config;
/**
* @param string $taskrc
* @param string $taskData
@@ -192,6 +197,19 @@ class Taskwarrior
return $this->version = trim($this->command('_version'));
}
/**
* @return Config
* @throws CommandException
*/
public function config()
{
if (!$this->config) {
$this->config = Config::create($this->command('_show'));
}
return $this->config;
}
/**
* @param $params
* @return array