Esempio n. 1
0
 private function getProcessInput()
 {
     $onSuccessDefault = array('location' => array('url' => implode('/', $this->request->getPath()) . '?taskStatus=success&taskId={taskId}', 'freeze' => TRUE));
     $onFailureDefault = array('location' => array('url' => implode('/', $this->request->getPath()) . '?taskStatus=failure&taskId={taskId}', 'freeze' => TRUE));
     $input = json_encode(array('starttime' => microtime(TRUE), 'conditions' => array('success' => isset($this->conditions['success']) ? $this->conditions['success'] : $onSuccessDefault, 'failure' => isset($this->conditions['failure']) ? $this->conditions['failure'] : $onFailureDefault)));
     return $input;
 }
Esempio n. 2
0
 private function createLoginRequest(\Nethgui\Controller\Request $originalRequest)
 {
     $m = $originalRequest->toArray();
     unset($m[\Nethgui\array_head($originalRequest->getPath())]);
     $r = new \Nethgui\Controller\Request(array_replace_recursive(array('Login' => array('path' => '/' . implode('/', $originalRequest->getPath()))), $m));
     $r->setAttribute('locale', $originalRequest->getLocale());
     $r->setAttribute('userClosure', $originalRequest->getAttribute('userClosure'));
     return $r;
 }