Example #1
0
 public function testEvent()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $event = new Events([]);
     $event->subject("Support Ticket #12345: How do I create an event?");
     $event->body("Just called Tim and walked him through how to create an event with the new API.\n    He'll reach out to support@relateiq.com with any questions he might have.\n    Resolving.\n    - James");
     $participantIds = [["type" => "email", "value" => "*****@*****.**"], ["type" => "email", "value" => "*****@*****.**"], ["type" => "phone", "value" => "8001235555"]];
     $event->participantIds($participantIds);
     $res = $event->update();
     $this->assertInstanceOf('Events', $res);
 }
 /** Edit an event
  * @access public
  * @return void
  * @todo Add geocoding in model
  */
 public function editAction()
 {
     $form = new EventForm();
     $form->details->setLegend('Edit event');
     $form->submit->setLabel('Save event');
     $this->view->form = $form;
     if ($this->_request->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $where = array();
             $where[] = $this->_events->getAdapter()->quoteInto('id = ?', $this->getParam('id'));
             $this->_events->update($form->getValues(), $where);
             $this->getFlash()->addMessage('You updated this events successfully.');
             $this->redirect('/admin/events/');
         } else {
             $form->populate($this->_request->getPost());
         }
     } else {
         $form->populate($this->_events->fetchRow('id=' . $this->getParam('id'))->toArray());
     }
 }
 /** Edit event details
  */
 public function editAction()
 {
     $form = new EventForm();
     $form->details->setLegend('Edit event');
     $form->submit->setLabel('Save event');
     $this->view->form = $form;
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         if ($form->isValid($formData)) {
             $address = $form->getValue('eventLocation');
             $coords = $this->_geocoder->getCoordinates($address);
             if ($coords) {
                 $lat = $coords['lat'];
                 $long = $coords['lon'];
             } else {
                 $lat = null;
                 $lon = null;
             }
             $insertdata = array('eventTitle' => $form->getValue('eventTitle'), 'eventDescription' => $form->getValue('eventDescription'), 'eventLocation' => $form->getValue('eventLocation'), 'organisation' => $form->getValue('organisation'), 'eventStartTime' => $form->getValue('eventStartTime'), 'eventEndTime' => $form->getValue('eventEndTime'), 'eventStartDate' => $form->getValue('eventStartDate'), 'eventEndDate' => $form->getValue('eventEndDate'), 'eventRegion' => $form->getValue('eventRegion'), 'eventType' => $form->getValue('eventType'), 'latitude' => $lat, 'longitude' => $long, 'adultsAttend' => $form->getValue('adultsAttend'), 'childrenAttend' => $form->getValue('childrenAttend'), 'updated' => $this->getTimeForForms(), 'updatedBy' => $this->getIdentityForForms());
             foreach ($insertdata as $key => $value) {
                 if (is_null($value) || $value == "") {
                     unset($insertdata[$key]);
                 }
             }
             $events = new Events();
             $where = array();
             $where[] = $events->getAdapter()->quoteInto('id = ?', $this->getParam('id'));
             $events->update($insertdata, $where);
             $this->getFlash()->addMessage('You updated: <em>' . $form->getValue('eventTitle') . '</em> successfully.');
             $this->redirect('/users/events/');
         } else {
             $form->populate($formData);
         }
     } else {
         // find id is expected in $params['id']
         $id = (int) $this->_request->getParam('id', 0);
         if ($id > 0) {
             $events = new Events();
             $event = $events->fetchRow('id=' . (int) $id);
             $form->populate($event->toArray());
         }
     }
 }
Example #4
0
 private function getFirstMessage($agent)
 {
     /*
     	NOTE:  CHRISTOPHER WHITELEY
     	Within this section we have allowed the alteration of how SIF Ack messages are needed.
     	If $sif_response, $sif_request, and $sif_event are set to a value of 2 then your system
     	will work according to SIF Specifications.  If you do not want to send a SIF_Ack message
     	for any of the three message types below you can change the value to 3.
     This functionality was done per request of a paid support member.
     */
     $sif_response = 2;
     $sif_request = 2;
     $sif_event = 2;
     $sif_ack = 2;
     $empty = null;
     $zero = 0;
     $id = $zero;
     $db = Zend_Registry::get('my_db');
     #		$mysql =   ''
     #				.' ('
     #				.' Select response_id v, 1 t '
     #				.' from ' .DBConvertor::convertCase('response').' where status_id in (1,2) '
     #				.' and agent_id_requester = '.$agent->agentId.' and context_id = '.$_SESSION['CONTEXT_ID'].' and zone_id = '.$_SESSION['ZONE_ID']
     #				.') '
     #				.' union all '
     #				.' ('
     #				.' Select request_id v, 2 t '
     #				.' from ' .DBConvertor::convertCase('request').' where status_id in (1,2) '
     #				.' and agent_id_responder = '.$agent->agentId.' and context_id = '.$_SESSION['CONTEXT_ID'].' and zone_id = '.$_SESSION['ZONE_ID']
     #				.') '
     #				.' union all '
     #				.' ('
     #				.'Select event_id v, 3 t '
     #				.' from ' .DBConvertor::convertCase('event').' where status_id in (1,2) '
     #				.' and agent_id_rec = '.$agent->agentId.' and context_id = '.$_SESSION['CONTEXT_ID'].' and zone_id = '.$_SESSION['ZONE_ID']
     #				.')'
     #				.' ORDER BY t, v LIMIT 1';
     $oracle = 'Select v, t from ( Select response_id v, 1 t ' . ' from ' . DBConvertor::convertCase('response') . ' where status_id in (1,2) ' . ' and agent_id_requester = ' . $agent->agentId . ' and context_id = ' . $_SESSION['CONTEXT_ID'] . ' and zone_id = ' . $_SESSION['ZONE_ID'] . ' union all ' . 'Select request_id v, 2 t ' . 'from ' . DBConvertor::convertCase('request') . ' where status_id in (1,2) ' . '   and agent_id_responder = ' . $agent->agentId . '   and context_id = ' . $_SESSION['CONTEXT_ID'] . '   and zone_id = ' . $_SESSION['ZONE_ID'] . ' union all ' . 'Select event_id v, 3 t ' . ' from ' . DBConvertor::convertCase('event') . ' where status_id in (1,2) ' . ' and agent_id_rec = ' . $agent->agentId . ' and context_id = ' . $_SESSION['CONTEXT_ID'] . ' and zone_id = ' . $_SESSION['ZONE_ID'] . ') ORDER BY t, v';
     $mysql = 'select id, msg_type, data ' . ' from ' . DBConvertor::convertCase('messagequeue') . ' where agt_id_out = ' . $agent->agentId . ' and zone_id = ' . $_SESSION['ZONE_ID'] . ' and context_id = ' . $_SESSION['CONTEXT_ID'] . ' and status_id in (1,2) ' . ' order by status_id desc, msg_type asc, insert_timestamp asc' . ' Limit 1';
     switch (DB_TYPE) {
         case 'mysql':
             $sql = $mysql;
             break;
         case 'oci8':
             $sql = $oracle;
             $db->setLobAsString(true);
             break;
     }
     try {
         $stmt = $db->query($sql);
         $result = $stmt->fetchAll();
     } catch (Zend_Exception $e) {
         ZitLog::writeToErrorLog("[SystemControl]", "Errors:{$e->getTraceAsString}() \n \n {$sql}", "Try|Catch block", $_SESSION['ZONE_ID']);
         GeneralError::systemError($xml);
     }
     switch (DB_TYPE) {
         case 'mysql':
             $id = isset($result[0]->id) ? $result[0]->id : $zero;
             #				$msgType = isset($result[0]->msg_type) ? $result[0]->msg_type : $zero;
             $msgType = 4;
             $XMLData = isset($result[0]->data) ? $result[0]->data : $zero;
             break;
         case 'oci8':
             $id = isset($result[0]->V) ? $result[0]->V : $zero;
             $msgType = isset($result[0]->T) ? $result[0]->T : $zero;
             break;
     }
     //		ZitLog::writeToErrorLog("[SystemControl]", "id: $id --> msgType: $msgType\n\n", "Record Found?", $_SESSION['ZONE_ID']);
     if ($id != $zero) {
         switch ($msgType) {
             case 1:
                 /*****
                 			ORACLE ONLY
                 			$SIF_ACK is used to set the status of the message read. The SIF Standard states that you should 
                 			set this value to 2 so that the item can be requested again if an error happens. Setting the item
                 			to a 3 will allow you not to send a SIF_Ack Message.
                 			*****/
                 $response = new Responses($db);
                 $where = "response_id = {$id}";
                 $result2 = $response->fetchAll($where);
                 foreach ($result2 as $row) {
                     switch (DB_TYPE) {
                         case 'mysql':
                             $status_id = $row->status_id;
                             $responseData = $row->response_data;
                             break;
                         case 'oci8':
                             $status_id = $row->STATUS_ID;
                             $responseData = $row->RESPONSE_DATA;
                             break;
                     }
                 }
                 $dom = new DomDocument();
                 $dom->loadXML($responseData);
                 $headerNode = $dom->getElementsByTagName('SIF_Header')->item(0);
                 $msgId = $headerNode->getElementsByTagName('SIF_MsgId')->item(0)->nodeValue;
                 $data = array(DBConvertor::convertCase('status_id') => $sif_response, DBConvertor::convertCase('msg_id') => $msgId);
                 $n = $response->update($data, 'response_id = ' . $id);
                 return $responseData;
                 break;
             case 2:
                 /*****
                 			ORACLE ONLY
                 			$SIF_ACK is used to set the status of the message read. The SIF Standard states that you should 
                 			set this value to 2 so that the item can be requested again if an error happens. Setting the item
                 			to a 3 will allow you not to send a SIF_Ack Message.
                 			*****/
                 $request = new Requests($db);
                 $where = "request_id = {$id}";
                 $result = $request->fetchAll($where);
                 foreach ($result as $row) {
                     switch (DB_TYPE) {
                         case 'mysql':
                             $status_id = $row->status_id;
                             $requestData = $row->request_data;
                             break;
                         case 'oci8':
                             $status_id = $row->STATUS_ID;
                             $messageDataXML = $row->REQUEST_DATA;
                             //	$requestData = $messageDataXML->read($messageDataXML->size());
                             $requestData = $messageDataXML;
                             break;
                     }
                 }
                 $dom = new DomDocument();
                 $dom->loadXML($requestData);
                 $headerNode = $dom->getElementsByTagName('SIF_Header')->item(0);
                 $msgId = $headerNode->getElementsByTagName('SIF_MsgId')->item(0)->nodeValue;
                 $data = array(DBConvertor::convertCase('status_id') => $sif_request, DBConvertor::convertCase('msg_id') => $msgId);
                 $n = $request->update($data, 'request_id = ' . $id);
                 return $requestData;
                 break;
             case 3:
                 /*****
                 			ORACLE ONLY
                 			$SIF_ACK is used to set the status of the message read. The SIF Standard states that you should 
                 			set this value to 2 so that the item can be requested again if an error happens. Setting the item
                 			to a 3 will allow you not to send a SIF_Ack Message.
                 			*****/
                 $event = new Events($db);
                 $where = "event_id = {$id}";
                 $result = $event->fetchAll($where);
                 foreach ($result as $row) {
                     switch (DB_TYPE) {
                         case 'mysql':
                             $status_id = $row->status_id;
                             $eventData = $row->event_data;
                             break;
                         case 'oci8':
                             $status_id = $row->STATUS_ID;
                             $eventData = $row->EVENT_DATA;
                             break;
                     }
                 }
                 $dom = new DomDocument();
                 $dom->loadXML($eventData);
                 $headerNode = $dom->getElementsByTagName('SIF_Header')->item(0);
                 $msgId = $headerNode->getElementsByTagName('SIF_MsgId')->item(0)->nodeValue;
                 $data = array(DBConvertor::convertCase('status_id') => $sif_event, DBConvertor::convertCase('msg_id') => $msgId);
                 $n = $event->update($data, 'event_id = ' . $id);
                 return $eventData;
                 break;
             case 4:
                 $message = new MessageQueues($db);
                 /*****
                 			$SIF_ACK is used to set the status of the message read. The SIF Standard states that you should 
                 			set this value to 2 so that the item can be requested again if an error happens. Setting the item
                 			to a 3 will allow you not to send a SIF_Ack Message.
                 			*****/
                 $data = array(DBConvertor::convertCase('status_id') => $sif_ack);
                 $n = $message->update($data, 'id = ' . $id);
                 return $XMLData;
                 break;
         }
     } else {
         return null;
     }
 }
 protected final function process_request()
 {
     //	Process
     //
     if ($this->request_noun === REQUEST_NOUN_USERS) {
         if ($this->request_verb === 'show') {
             //	Show
             //
             if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                 Users::show($this->inputter, $this->outputter);
             } else {
                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
             }
         } else {
             if ($this->request_verb === 'search' && $this->http_method === HTTP_METHOD_GET) {
                 //	Search
                 //
                 Users::search($this->inputter, $this->outputter);
             } else {
                 if ($this->request_verb === 'lookup' && $this->http_method === HTTP_METHOD_GET) {
                     //	Lookup
                     //
                     Users::lookup($this->inputter, $this->outputter);
                 } else {
                     $this->invalid_process_verb();
                 }
             }
         }
     } else {
         if ($this->request_noun === REQUEST_NOUN_FRIENDS) {
             if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
                 //	List
                 //
                 Friends::_list($this->inputter, $this->outputter);
             } else {
                 if ($this->request_verb === 'ids' && $this->http_method === HTTP_METHOD_GET) {
                     //	User IDs
                     //
                     Friends::ids($this->inputter, $this->outputter);
                 } else {
                     $this->invalid_process_verb();
                 }
             }
         } else {
             if ($this->request_noun === REQUEST_NOUN_FOLLOWERS) {
                 if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
                     //	List
                     //
                     Followers::_list($this->inputter, $this->outputter);
                 } else {
                     if ($this->request_verb === 'ids' && $this->http_method === HTTP_METHOD_GET) {
                         //	User IDs
                         //
                         Followers::ids($this->inputter, $this->outputter);
                     } else {
                         $this->invalid_process_verb();
                     }
                 }
             } else {
                 if ($this->request_noun === REQUEST_NOUN_IN_PRODUCT_PROMOTIONS) {
                     if ($this->request_verb === 'show') {
                         //	Show
                         //
                         if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                             //	In Product Promotion ID
                             //
                             InProductPromotions::show($this->inputter, $this->outputter);
                         } else {
                             $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                         }
                     } else {
                         if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                             //	Create
                             //
                             InProductPromotions::create($this->inputter, $this->outputter);
                         } else {
                             if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                 //	Update
                                 //
                                 InProductPromotions::update($this->inputter, $this->outputter);
                             } else {
                                 if ($this->request_verb === 'destroy') {
                                     //	Destroy
                                     //
                                     if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                         //	In Product Promotion ID
                                         //
                                         InProductPromotions::destroy($this->inputter, $this->outputter);
                                     } else {
                                         $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                     }
                                 } else {
                                     $this->invalid_process_verb();
                                 }
                             }
                         }
                     }
                 } else {
                     if ($this->request_noun === REQUEST_NOUN_INVITATIONS) {
                         if ($this->request_verb === 'show') {
                             //	Show
                             //
                             if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                 Invitations::show($this->inputter, $this->outputter);
                             } else {
                                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                             }
                         } else {
                             if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                 //	Create
                                 //
                                 Invitations::create($this->inputter, $this->outputter);
                             } else {
                                 if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                     //	Update
                                     //
                                     Invitations::update($this->inputter, $this->outputter);
                                 } else {
                                     if ($this->request_verb === 'destroy') {
                                         //	Destroy
                                         //
                                         if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                             //	Invitation ID
                                             //
                                             Invitations::destroy($this->inputter, $this->outputter);
                                         } else {
                                             $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                         }
                                     } else {
                                         if ($this->request_verb === 'incoming') {
                                             //	Incoming
                                             //
                                             if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                 //	List
                                                 //
                                                 Invitations::incoming_list($this->inputter, $this->outputter);
                                             } else {
                                                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                             }
                                         } else {
                                             if ($this->request_verb === 'outgoing') {
                                                 //	Outgoing
                                                 //
                                                 if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                     //	List
                                                     //
                                                     Invitations::outgoing_list($this->inputter, $this->outputter);
                                                 } else {
                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                 }
                                             } else {
                                                 $this->invalid_process_verb();
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     } else {
                         if ($this->request_noun === REQUEST_NOUN_EVENT_OCCURRENCES) {
                             //	Event Occurrences
                             //
                             if ($this->request_verb === 'show') {
                                 //	Show
                                 //
                                 if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                     EventOccurrences::show($this->inputter, $this->outputter);
                                 } else {
                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                 }
                             } else {
                                 if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                     //	Create
                                     //
                                     EventOccurrences::create($this->inputter, $this->outputter);
                                 } else {
                                     if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                         //	Update
                                         //
                                         EventOccurrences::update($this->inputter, $this->outputter);
                                     } else {
                                         if ($this->request_verb === 'destroy') {
                                             //	Destroy
                                             //
                                             if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                 //	Event Occurrence ID
                                                 //
                                                 EventOccurrences::destroy($this->inputter, $this->outputter);
                                             } else {
                                                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                             }
                                         } else {
                                             if ($this->request_verb === 'list') {
                                                 //	List
                                                 //
                                                 if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'event' && $this->http_method === HTTP_METHOD_GET) {
                                                     //	Created
                                                     //
                                                     EventOccurrences::list_event($this->inputter, $this->outputter);
                                                 } else {
                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                 }
                                             } else {
                                                 $this->invalid_process_verb();
                                             }
                                         }
                                     }
                                 }
                             }
                         } else {
                             if ($this->request_noun === REQUEST_NOUN_PHOTOS) {
                                 if ($this->request_verb === 'show') {
                                     //	Show
                                     //
                                     if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                         //	Photo ID
                                         //
                                         Photos::show($this->inputter, $this->outputter);
                                     } else {
                                         $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                     }
                                 } else {
                                     if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                         //	Create
                                         //
                                         Photos::create($this->inputter, $this->outputter);
                                     } else {
                                         if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                             //	Update
                                             //
                                             Photos::update($this->inputter, $this->outputter);
                                         } else {
                                             if ($this->request_verb === 'destroy') {
                                                 //	Destroy
                                                 //
                                                 if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                     //	Photo ID
                                                     //
                                                     Photos::destroy($this->inputter, $this->outputter);
                                                 } else {
                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                 }
                                             } else {
                                                 if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                     //	List
                                                     //
                                                     Photos::_list($this->inputter, $this->outputter);
                                                 } else {
                                                     $this->invalid_process_verb();
                                                 }
                                             }
                                         }
                                     }
                                 }
                             } else {
                                 if ($this->request_noun === REQUEST_NOUN_ALBUMS) {
                                     if ($this->request_verb === 'show') {
                                         //	Show
                                         //
                                         if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                             //	Album ID
                                             //
                                             Albums::show($this->inputter, $this->outputter);
                                         } else {
                                             $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                         }
                                     } else {
                                         if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                             //	Create
                                             //
                                             Albums::create($this->inputter, $this->outputter);
                                         } else {
                                             if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                                 //	Update
                                                 //
                                                 Albums::update($this->inputter, $this->outputter);
                                             } else {
                                                 if ($this->request_verb === 'destroy') {
                                                     //	Destroy
                                                     //
                                                     if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                         //	Album ID
                                                         //
                                                         Albums::destroy($this->inputter, $this->outputter);
                                                     } else {
                                                         $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                     }
                                                 } else {
                                                     if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                         //	List
                                                         //
                                                         Albums::_list($this->inputter, $this->outputter);
                                                     } else {
                                                         $this->invalid_process_verb();
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 } else {
                                     if ($this->request_noun === REQUEST_NOUN_SEARCH) {
                                         if ($this->http_method === HTTP_METHOD_GET) {
                                             if ($this->request_verb === 'list') {
                                                 //	Search
                                                 //
                                                 Search::search_list($this->inputter, $this->outputter);
                                             }
                                         }
                                     } else {
                                         if ($this->request_noun === REQUEST_NOUN_FOLLOWINGS) {
                                             if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                 //	List
                                                 //
                                                 Followings::_list($this->inputter, $this->outputter);
                                             } else {
                                                 if ($this->request_verb === 'ids' && $this->http_method === HTTP_METHOD_GET) {
                                                     //	User IDs
                                                     //
                                                     Followings::ids($this->inputter, $this->outputter);
                                                 } else {
                                                     if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                                         //	Create
                                                         //
                                                         Followings::create($this->inputter, $this->outputter);
                                                     } else {
                                                         if ($this->request_verb === 'destroy' && $this->http_method === HTTP_METHOD_POST) {
                                                             //	User IDs
                                                             //
                                                             Followings::destroy($this->inputter, $this->outputter);
                                                         } else {
                                                             $this->invalid_process_verb();
                                                         }
                                                     }
                                                 }
                                             }
                                         } else {
                                             if ($this->request_noun === REQUEST_NOUN_ACCOUNT) {
                                                 if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                                     Account::create($this->inputter, $this->outputter);
                                                 } else {
                                                     if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                                         Account::update($this->inputter, $this->outputter);
                                                     } else {
                                                         if ($this->request_verb === 'destroy' && $this->http_method === HTTP_METHOD_DELETE) {
                                                             //	Destroy
                                                             //
                                                             if (isset($this->inputter->additional_uri_arguments[0]) && count($this->inputter->additional_uri_arguments) === 1) {
                                                                 Account::destroy($this->inputter, $this->outputter);
                                                             } else {
                                                                 // Throw error, identification is required
                                                                 //
                                                                 $error = Error::withDomain(PRIVATE_EVENTS_REST_CONTROLLER_ERROR_DOMAIN, ERROR_CODE_VALIDATION_PROPERTY_NOT_SET, 'A user identification is required.');
                                                                 $this->outputter->print_error($error);
                                                             }
                                                         } else {
                                                             if ($this->request_verb === 'authenticate' && $this->http_method === HTTP_METHOD_POST) {
                                                                 Account::authenticate($this->inputter, $this->outputter);
                                                             } else {
                                                                 if ($this->request_verb === 'unauthenticate' && $this->http_method === HTTP_METHOD_POST) {
                                                                     Account::unauthenticate($this->inputter, $this->outputter);
                                                                 } else {
                                                                     $this->invalid_process_verb();
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             } else {
                                                 if ($this->request_noun === REQUEST_NOUN_EVENTS) {
                                                     if ($this->request_verb === 'show') {
                                                         //	Show
                                                         //
                                                         if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_POST) {
                                                             Events::show($this->inputter, $this->outputter);
                                                         } else {
                                                             $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                         }
                                                     } else {
                                                         if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                                             //	Create
                                                             //
                                                             Events::create($this->inputter, $this->outputter);
                                                         } else {
                                                             if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                                                 //	Update
                                                                 //
                                                                 Events::update($this->inputter, $this->outputter);
                                                             } else {
                                                                 if ($this->request_verb === 'destroy') {
                                                                     //	Destroy
                                                                     //
                                                                     if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                                         //	Event ID
                                                                         //
                                                                         Events::destroy($this->inputter, $this->outputter);
                                                                     } else {
                                                                         $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                     }
                                                                 } else {
                                                                     if ($this->request_verb === 'attend' && $this->http_method === HTTP_METHOD_POST) {
                                                                         //  Attend
                                                                         //
                                                                         Events::attend($this->inputter, $this->outputter);
                                                                     } else {
                                                                         if ($this->request_verb === 'search' && $this->http_method === HTTP_METHOD_GET) {
                                                                             //	Search
                                                                             //
                                                                             Events::search($this->inputter, $this->outputter);
                                                                         } else {
                                                                             if ($this->request_verb === 'list') {
                                                                                 //	List
                                                                                 //
                                                                                 if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'event_type' && $this->http_method === HTTP_METHOD_GET) {
                                                                                     //	Event Type
                                                                                     //
                                                                                     Events::list_event_type($this->inputter, $this->outputter);
                                                                                 } else {
                                                                                     if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'created' && $this->http_method === HTTP_METHOD_GET) {
                                                                                         //	Created
                                                                                         //
                                                                                         Events::list_created($this->inputter, $this->outputter);
                                                                                     } else {
                                                                                         if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'invited' && $this->http_method === HTTP_METHOD_GET) {
                                                                                             //	Invited
                                                                                             //
                                                                                             Events::list_invited($this->inputter, $this->outputter);
                                                                                         } else {
                                                                                             if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'nearby' && $this->http_method === HTTP_METHOD_GET) {
                                                                                                 //	Nearby
                                                                                                 //
                                                                                                 Events::list_nearby($this->inputter, $this->outputter);
                                                                                             } else {
                                                                                                 if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'popular' && $this->http_method === HTTP_METHOD_GET) {
                                                                                                     //	Popular
                                                                                                     //
                                                                                                     Events::list_popular($this->inputter, $this->outputter);
                                                                                                 } else {
                                                                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             } else {
                                                                                 $this->invalid_process_verb();
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 } else {
                                                     if ($this->request_noun === REQUEST_NOUN_LOCATIONS) {
                                                         if ($this->request_verb === 'show') {
                                                             //	Show
                                                             //
                                                             if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                                                 //	Location ID
                                                                 //
                                                                 Locations::show($this->inputter, $this->outputter);
                                                             } else {
                                                                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                             }
                                                         } else {
                                                             if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                                                 //	Create
                                                                 //
                                                                 Locations::create($this->inputter, $this->outputter);
                                                             } else {
                                                                 if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                                                     //	Update
                                                                     //
                                                                     Locations::update($this->inputter, $this->outputter);
                                                                 } else {
                                                                     if ($this->request_verb === 'destroy') {
                                                                         //	Destroy
                                                                         //
                                                                         if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                                             //	Location ID
                                                                             //
                                                                             Locations::destroy($this->inputter, $this->outputter);
                                                                         } else {
                                                                             $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                         }
                                                                     } else {
                                                                         $this->invalid_process_verb();
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     } else {
                                                         if ($this->request_noun === REQUEST_NOUN_TICKETS) {
                                                             if ($this->request_verb === 'show') {
                                                                 //	Show
                                                                 //
                                                                 if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
                                                                     //	Ticket ID
                                                                     //
                                                                     Tickets::show($this->inputter, $this->outputter);
                                                                 } else {
                                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                 }
                                                             } else {
                                                                 if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
                                                                     //	Create
                                                                     //
                                                                     Tickets::create($this->inputter, $this->outputter);
                                                                 } else {
                                                                     if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
                                                                         //	Update
                                                                         //
                                                                         Tickets::update($this->inputter, $this->outputter);
                                                                     } else {
                                                                         if ($this->request_verb === 'destroy') {
                                                                             //	Destroy
                                                                             //
                                                                             if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
                                                                                 //	Ticket ID
                                                                                 //
                                                                                 Tickets::destroy($this->inputter, $this->outputter);
                                                                             } else {
                                                                                 $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                             }
                                                                         } else {
                                                                             if ($this->request_verb === 'outgoing') {
                                                                                 //	Outgoing
                                                                                 //
                                                                                 if (count($this->inputter->additional_uri_arguments) === 1 && $this->inputter->additional_uri_arguments[0] === 'list' && $this->http_method === HTTP_METHOD_GET) {
                                                                                     //	List
                                                                                     //
                                                                                     Tickets::outgoing_list($this->inputter, $this->outputter);
                                                                                 } else {
                                                                                     $this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
                                                                                 }
                                                                             } else {
                                                                                 $this->invalid_process_verb();
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         } else {
                                                             $this->invalid_process_noun();
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }