public function run() { Request::parse(); $controller = 'PY\\App\\Controllers\\' . ucfirst(Request::$controller); $method = Request::$method; $objectManager = ObjectManager::getInstance(); echo $objectManager->invokeMethod($objectManager->get($controller), $method); }
static function run() { // Start parsing the Request. $R = new Request(); $R->parse(); // The requested controller or the default. $kontroller = $R->determineController(); $kontroller->render(); }
static function run() { $r = new Request(); $r->parse(); $controller = $r->controller . 'Controller'; $action = $r->action; if (class_exists($controller)) { $obj = new $controller($r); $obj->render(); } else { // do default stuff; $obj = new UserController(new Request()); $obj->render(); } }
public function recv() { return Request::parse($this->reqs->recv()); }
$subedition = false; if (strlen($_GET['subedition']) && $_GET['subedition'] == '1') { $subedition = true; } // getting request and id parameters $id = idGet(); $imaging_server = quickGet('imaging_server'); $group = new Group($id, true); $request = quickGet('request'); if (strlen($request)) { $r = new Request(); $r->parse($request); $request = $r; } elseif (strlen($id)) { $r = new Request(); $r->parse($group->getRequest()); $request = $r; } else { $request = new Request(); } // a part of the request has to be removed if ($_GET['action'] == 'computersgroupsubedit' || $_GET['action'] == 'computersgroupcreatesubedit') { if (strlen(quickGet('sub_id'))) { $sub = $request->getSub(quickGet('sub_id')); quickSet('req', $sub->module); quickSet('add_param', $sub->crit); quickSet('value', $sub->val); $request->removeSub(quickGet('sub_id')); } } if ($_GET['action'] == 'computersgroupsubdel' || $_GET['action'] == 'computersgroupcreatesubdel') {
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC. If not, see <http://www.gnu.org/licenses/>. */ require "modules/base/computers/localSidebar.php"; require "graph/navbar.inc.php"; require_once "modules/dyngroup/includes/includes.php"; $gid = quickGet('gid'); if (!$gid) { // TODO !! $request = quickGet('request'); $r = new Request(); $r->parse($request); $result = new Result($r, $group->getBool()); $result->replyToRequest(); $result->displayResListInfos(); } else { $group = getPGobject($gid, true); if (isset($items[$gid])) { $item = $items[$gid]; } else { $item = null; } if ($group->type == 0) { __my_header(sprintf(_T("Group '%s' content", "dyngroup"), $group->getName()), $sidemenu, $item, $group); } else { __my_header(sprintf(_T("Display profile '%s' content", "dyngroup"), $group->getName()), $sidemenu, $item, $group); }
public function setRequest($request) { $this->requests[] = Request::parse($request); }
/** * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com * (c) 2007-2009 Mandriva, http://www.mandriva.com * * $Id$ * * This file is part of Mandriva Management Console (MMC). * * MMC is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC. If not, see <http://www.gnu.org/licenses/>. */ function parse_request($str) { $req = new Request(); $req->parse($str); return $req; }
/** * Parse options * * @return void */ public function parseRequest() { $this->request->parse($this->commands, $this->options); }
public static function parse($input) { if (($input = json_decode($input, true)) === FALSE || !isset($input['requests']) || !is_array($input['requests']) || !isset($input['authToken'])) { throw new ServerException('Query.parse: malformat query.'); } $query = new Query(); $query->authToken = AuthToken::parse($input['authToken']); $query->requests = array(); foreach ($input['requests'] as $request) { $query->requests[] = Request::parse($request); } return $query; }