public function moveTaskToList($listId, $taskId, $newListId)
 {
     unset($this->db[$listId]);
     unset($this->db[$newListId]);
     return parent::moveTaskToList($listId, $taskId, $newListId);
 }
예제 #2
0
require "vendor/elvisciotti/php-file-access/Ec/FileAccess.php";
/**
 * 
 * GTASK CLIENT
 * 
 */
$baseUrl = 'http://www.bettergoogletasks.com/';
$helper = new ClientHelper(array('appName' => "Todo List", 'clientId' => getenv('BGT_CLIENT_ID'), 'clientSecret' => getenv('BGT_SECRET_ID'), 'baseUrl' => rtrim($baseUrl, '/'), 'redirectUrl' => rtrim($baseUrl, '/') . '/oauth2callback'));
$useCache = true;
if ($useCache) {
    // cache using token MD5 as a cache prefix
    $service = new GtaskHelperCached($helper);
    $cachePrefix = md5(serialize($helper->readToken()));
    $service->setFileAccess(new FileAccess(__DIR__ . '/tmp/', $cachePrefix));
} else {
    $service = new GtaskHelper($helper);
}
/**
 * 
 * SILEX APP
 * 
 */
$app = new Silex\Application(['debug' => true]);
/**
 * 
 * ROUTES
 * 
 */
// HOMEPAGE
$app->get('/', function () use($helper, $app) {
    if ($helper->isTokenValid()) {