TODO List (PHP, PDO, SQLite)

Download Sources

Example of how to use generated data access code

$ds = new PDODataStore();


$tasks_dao = new dao\TasksDao($ds);

$tasks = $tasks_dao->getGroupTasks($g_id); // $task_dao->... are visible for code assistance

foreach ($tasks as $t) { // $t->... are visible for code assistance
    echo '<tr>';
    echo '<td>' . $t->getT_date() . '</td>' . PHP_EOL;
    /* ... */
    echo '</tr>';


XML meta-program

    <dto-class name="Group" ref="get_groups.sql"/>
    <dto-class name="Task" ref="tasks"/>
	<crud table="groups" dto="Group">
		<create method="createGroup" />
		<read method="readGroup" />
		<update method="updateGroup" />
		<delete method="deleteGroup" />
	<query-dto-list method="getGroups" ref="get_groups.sql" dto="Group" />
	<exec-dml method="deleteTasks(g_id)" ref="delete_group_tasks.sql" />
	<crud table="tasks" dto="Task">
		<create method="createTask" />
		<read method="readTask" />
		<update method="updateTask" />
		<delete method="deleteTask" />
	<query-dto-list method="getGroupTasks(g_id)" ref="get_group_tasks.sql" dto="Task" />