$p->load(10693); $da = $p->getDefaultAssumptions(); print_r($da); exit; $c->setMode('SHELL'); // Define Options $short = 'p:'; // Script Path $short .= 'a:'; // Authorized User ID $short .= 'r:'; // Request Parameters $opt = getopt($short, array()); // Assign Path if (!isset($opt['p'])) { echo "-p PATH REQUIRED\n"; exit; } else { $c->setPath(explode('/', $opt['p'])); } // Assign Request Parameters if (isset($opt['r'])) { $r = array(); parse_str($opt['r'], $r); if (is_array($r)) { $c->setParams($r); } } // Run $c->run(); exit;
$c->setMode('GET'); $c->setParams($_GET); break; case 'POST': $c->setMode('POST'); if (is_array($d)) { $c->setParams($d); } else { $c->setParams($_POST); } break; case 'DELETE': $c->setMode('DELETE'); $c->setParams($_REQUEST); break; case 'PUT': $c->setMode('PUT'); if (is_array($d)) { $c->setParams($d); } else { $c->setParams($_REQUEST); } break; default: throw new \Exception("Invalid request method: {$_SERVER['REQUEST_METHOD']}", 500); } $c->setPath(explode('/', $_SERVER['REDIRECT_URL'])); $c->run(); echo '<pre>'; print_r($_SERVER); exit;