function addTask($params) { $rid = $params["rid"]; $step_id = $params["step_id"]; $routes = new Model_Route(); $routes->addDraftRouteTask($rid, $step_id); echo $routes->getTid(); }