Exemple #1
0
 public function routeHandler($route)
 {
     parent::routeHandler($route);
     switch ($route) {
         case '/update.json':
             getAuthentication()->requireAuthentication();
             $user = new User();
             $user->setAttribute($_POST['section'], $_POST['key']);
             return array('message' => sprintf('Updated tutorial for %s', $_POST['section']), 'code' => 200, 'result' => true);
             break;
     }
 }