Go to file
DavidBadura ec3976e39a update config 2015-04-22 12:34:30 +00:00
src update config 2015-04-22 12:34:30 +00:00
tests add config 2015-04-22 12:34:30 +00:00
.gitignore first draft 2015-02-05 20:41:03 +01:00
.travis.yml fix build 2015-04-22 10:59:26 +00:00
LICENSE Initial commit 2015-02-05 14:24:24 +01:00
README.md Update README.md 2015-04-13 09:55:13 +02:00
composer.json add doctrine array collection 2015-04-22 10:44:11 +00:00
phpunit.xml.dist first draft 2015-02-05 20:41:03 +01:00

README.md

Taskwarrior PHP lib

Build Status

WOW

Install

composer require 'davidbadura/taskwarrior'

Requirements: Taskwarrior >=2.1

Usage

use DavidBadura\Taskwarrior\TaskManager;
use DavidBadura\Taskwarrior\Task;
use DavidBadura\Taskwarrior\Recurring;

$tm = TaskManager::create();

$task = new Task();
$task->setDescription('program this lib');
$task->setProject('hobby');
$task->setDue('tomorrow');
$task->setPriority(Task::PRIORITY_HIGH);
$task->addTag('next');
$task->setRecurring(Recurring::DAILY);

$tm->save($task);

$tasks = $tm->filter('project:hobby'); // one task

$tm->done($task);

$tasks = $tm->filter('project:hobby'); // empty

API

todo...

QueryBuilder

$tasks = $taskManager->createQueryBuilder()
    ->whereProject('hobby')
    ->sortBy(QueryBuilder::SORT_ENTRY)
    ->getResult()