PHP Classes

PHP TODO Tasks Manager: Manage to do lists stored in CSV files

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 198 All time: 8,501 This week: 455Up
Version License PHP version Categories
ttmanager 1.0.0Custom (specified...5PHP 5, Files and Folders, Project Man...
Description 

Author

This package can manage to do lists stored in CSV files.

It can create a to do task and add it to a list that can be later saved to a file in the CSV format.

The class can edit a task, delete a task, mark a task as done, mark as undone, mark all tasks as done, delete all, count done, count undone, count all, etc,...

Picture of zinsou A.A.E.Moïse
  Performance   Level  
Name: zinsou A.A.E.Moïse is available for providing paid consulting. Contact zinsou A.A.E.Moïse .
Classes: 50 packages by
Country: Benin Benin
Age: 34
All time rank: 6761 in Benin Benin
Week rank: 214 Up1 in Benin Benin Equal
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Recommendations

plain text
todo text file

Example

<?php
require_once('ToDo.class.php');
echo
'<pre>';
/* create a TODO file*/
$x=new createToDo();//start your todo file; you can use your own one dimension array here to specify your heders
$x->setHeader();//add your headers
$x->add(0,["first","24-10-2018","","","","1"]);// add a thing to do
$x->add(1,["first2","24-10-2018","","","","1"]);// add a another thing to do
$x->change_pos(0,1);//change some todo position if necessary
$x->delete(0);//delete a todo by position if necessary
$x->makefile('todo.csv'); // make the todo file. Note that: this must always be the last statement .any statement before this won't be saved


/* manage a TODO file*/

$y=new manageToDo('todo.csv');// start you todo file manager
var_dump($y->get('todo','first')).'<br>';// get a value knowing header and row values
$y->check('first');//mark as done
echo $y->get('todo','first').'<br>';
$y->check('first');//mark as done
echo $y->get('todo','first').'<br>';;
// $y->delete('first');// delete a task
// $y->delete_checked();//delete all done tasks
$y->save();//save the modification
var_dump($z=$y->getHeader());//get the headers
var_dump($y->change_Header('todo','check'));//change a header value
var_dump($y->getHeader());
$y->add(["first","24-10-2018","","","2","1"],true);/*add a task .
This become an edition instead of addition because
first already exists and ,the second parameter is true instead of false .
To avoid edition two option another name or pass false as second parameter
*/

$y->add(["first3","24-10-2018","","","2","1"],true);//add a task
$y->add(["15","24-10-2018","","","2","1"],true);//add a task

$y->uncheck('15');//mark as undone
$y->uncheck('first3');//mark as undone

var_dump($y->add_Header('todo'));//add a new header
var_dump($y->add_Header('start'));var_dump($y->getHeader());//add a new header

echo $y->count_all().'<br>';
echo
$y->count_checked().'<br>';
echo
$y->count_unchecked().'<br>';

var_dump($y->get_checked());//get all done tasks;
var_dump($y->get_unchecked());//get all undone tasks;
$y->uncheck_checked();//make undone all done tasks;
$y->check_all();//mark all tasks as done

$y->edit('description','15','mama mia');// edit a task here we change the task 15's description

$y->save($z[0]);//always do this to be sure to save all your modifications and also to specify the first header in parameter to avoid primary id renaming.
// $y->delete_checked();
?>


Details

PHP TODO Tasks Manager package is a simple based on CSV file todo tasks manager . It can then be used as a good starting point to build more advanced and interactive todo tasks manager. see the file ToDotest.php for an explicit how to use example. Use the forum to suggest improvement ,report bug and send feedback Or contact me at leizmo@gmail.com. Ps: Note that while specifying yours headers with the methods createToDo::setHeader(), the first header will always be taken as index(primary id) and the last header as done/undone case.

  Files folder image Files (4)  
File Role Description
Accessible without login Plain text file license.txt Lic. license
Accessible without login Plain text file readme.txt Doc. readme
Plain text file ToDo.class.php Class class source
Accessible without login Plain text file ToDoTest.php Example example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:198
This week:0
All time:8,501
This week:455Up