public function postCreate() { $rules = array('title' => 'required', 'description' => 'required', 'broadcasted_in' => 'required'); $v = Validator::make(Input::all(), $rules); if ($v->fails()) { return Redirect::back()->withErrors($v); } Events::create(Input::all()); return Redirect::back()->with('success', 'New Event Added Successfully'); }
public function new_eventAction() { if ($this->request->isPost()) { $countryId = $this->request->getPost('country_id'); $country = Countries::findFirst(array('columns' => '*', 'conditions' => 'id LIKE :id:', 'bind' => array('id' => $countryId))); $countryName = ''; if ($country) { $countryName = $country->country; } $address = str_replace(' ', '+', $this->request->getPost('street') . '+' . $this->request->getPost('city') . '+' . $countryName); $userSession = $this->session->get("userSession"); $content = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?address=' . $address . '&key=AIzaSyAbpLPfBH8sNdVSzMULD_BZN9qrAqbL3V8'); $json = json_decode($content, true); $lat = $json['results'][0]['geometry']['location']['lat']; $lng = $json['results'][0]['geometry']['location']['lng']; //error_log('LAT : '.$lat.' LONG : '.$lng); $events = new Events(); $events->created = date('Y-m-d H:i:s'); $events->modified = date('Y-m-d H:i:s'); $events->member_id = $userSession['id']; $events->name = $this->request->getPost('name'); $events->website = $this->request->getPost('website'); $events->telephone = $this->request->getPost('telephone'); $events->street = $this->request->getPost('street'); $events->city = $this->request->getPost('city'); $events->country_id = $this->request->getPost('country_id'); $events->lat = $lat; $events->lng = $lng; $events->event_date = $this->request->getPost('eventdate'); $events->event_category_id = $this->request->getPost('event_category_id'); $events->eventinfo = $this->request->getPost('eventinfo'); if ($events->create()) { $id = $events->id; $this->flash->success('<button type="button" class="close" data-dismiss="alert">×</button>New event has been created'); if (!empty($this->request->getPost('review'))) { $review = new Reviews(); $review->created = date('Y-m-d H:i:s'); $review->modified = date('Y-m-d H:i:s'); $review->member_id = $userSession['id']; $review->event_id = $events->id; $review->content = $this->request->getPost('review'); $review->rate = $this->request->getPost('rate'); if ($review->create()) { $this->flash->success('<button type="button" class="close" data-dismiss="alert">×</button>You\'re review has been submitted.'); } } return $this->response->redirect('events/view/' . $id); } } $countries = Countries::find(); $this->view->setVar('countries', $countries); $eventsCategories = EventsCategories::find(); $this->view->setVar('eventsCategories', $eventsCategories); }
public function eventEntered() { $event = Events::create(array('evName' => Input::get('evName'), 'evIntro' => Input::get('evIntro'), 'evRules' => Input::get('evRules'), 'evCat' => Input::get('evCat'))); $phone = Input::get('phone'); foreach (Input::get('name') as $key => $name) { if (strlen($name) > 0) { $organizer = new Organizer(); $organizer->name = $name; if (strlen($phone[$key]) > 0) { $organizer->phone = $phone[$key]; } $organizer->evId = $event->evId; $organizer->save(); } } return Redirect::to('admin/eventEntry')->with('isErr', false)->with('msg', 'Successfully inserted event.'); }
/** * Store a newly created event in storage. * * @return Response */ public function store() { $data = Input::all(); $events = Events::create($data); if ($events) { $oc = Occupency::where('area_name', '=', $events->area)->first(); if ($events->event == 'ENTER') { $oc->user_count = $oc->user_count + 1; } else { $oc->user_count = $oc->user_count - 1; } if ($oc->user_count < 0) { $oc->user_count = 0; } $oc->save(); return Response::json(['error' => 'false', 'data' => $events->toArray()], 200); } return Response::json(['error' => 'true', 'message' => 'Could not create Event'], 400); }
$securityevents = new Events($db); // Delete events $sql = "DELETE FROM " . MAIN_DB_PREFIX . "events"; $sql .= " WHERE entity = " . $conf->entity; $resql = $db->query($sql); if (!$resql) { $error++; $mesg = '<div class="error">' . $db->lasterror() . '</div>'; } // Add event purge $text = $langs->trans("SecurityEventsPurged"); $securityevent = new Events($db); $securityevent->type = 'SECURITY_EVENTS_PURGE'; $securityevent->dateevent = $now; $securityevent->description = $text; $result = $securityevent->create($user); if ($result > 0) { $db->commit(); dol_syslog($text, LOG_WARNING); } else { $error++; dol_syslog($securityevent->error, LOG_ERR); $db->rolback(); } } /* * View */ llxHeader(); $form = new Form($db); $userstatic = new User($db);
if (!$session->is_logged_in()) { session_start(); } if (!isset($_SESSION['u_id'])) { redirect_to('../homepage.php'); } $user = Users::find_by_id($_SESSION['u_id']); if (isset($_POST['evnt'])) { $evnts = new Events(); $evnts->e_name = $_POST['name']; $evnts->e_description = $_POST['description']; $evnts->e_venue = $_POST['venue']; $evnts->e_time = $_POST['time']; $evnts->e_date = $_POST['date']; $evnts->e_duration = $_POST['duration']; $evnts->create(); } ?> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack --> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Debate Club</title> <!-- CSS --> <link href="../wp-content/themes/openmind/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="../wp-content/themes/openmind/css/font-awesome.min.css" rel="stylesheet" media="screen"> <link href="../wp-content/themes/openmind/css/animate.min.css" rel="stylesheet" media="screen"> <link href="../wp-content/themes/openmind/css/lightbox.css" rel="stylesheet" media="screen">
/** * Function called when a Dolibarrr business event is done. * All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared) * * @param string $action Event action code * @param Object $object Object * @param User $user Object user * @param Translate $langs Object langs * @param conf $conf Object conf * @return int <0 if KO, 0 if no triggered ran, >0 if OK */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { if (!empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) { return 0; } // Log events is disabled (hidden features) $key = 'MAIN_LOGEVENTS_' . $action; //dol_syslog("xxxxxxxxxxx".$key); if (empty($conf->global->{$key})) { return 0; } // Log events not enabled for this action if (empty($conf->entity)) { $conf->entity = $entity; } // forcing of the entity if it's not defined (ex: in login form) $date = dol_now(); // Actions if ($action == 'USER_LOGIN') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); // Initialisation donnees (date,duree,texte,desc) $text = "(UserLogged," . $object->login . ")"; $text .= empty($object->trigger_mesg) ? '' : ' - ' . $object->trigger_mesg; $desc = "(UserLogged," . $object->login . ")"; $desc .= empty($object->trigger_mesg) ? '' : ' - ' . $object->trigger_mesg; } if ($action == 'USER_LOGIN_FAILED') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); // Initialisation donnees (date,duree,texte,desc) $text = $object->trigger_mesg; // Message direct $desc = $object->trigger_mesg; // Message direct } if ($action == 'USER_LOGOUT') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); // Initialisation donnees (date,duree,texte,desc) $text = "(UserLogoff," . $object->login . ")"; $desc = "(UserLogoff," . $object->login . ")"; } if ($action == 'USER_CREATE') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("NewUserCreated", $object->login); $desc = $langs->transnoentities("NewUserCreated", $object->login); } elseif ($action == 'USER_MODIFY') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("EventUserModified", $object->login); $desc = $langs->transnoentities("EventUserModified", $object->login); } elseif ($action == 'USER_NEW_PASSWORD') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("NewUserPassword", $object->login); $desc = $langs->transnoentities("NewUserPassword", $object->login); } elseif ($action == 'USER_ENABLEDISABLE') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) if ($object->statut == 0) { $text = $langs->transnoentities("UserEnabled", $object->login); $desc = $langs->transnoentities("UserEnabled", $object->login); } if ($object->statut == 1) { $text = $langs->transnoentities("UserDisabled", $object->login); $desc = $langs->transnoentities("UserDisabled", $object->login); } } elseif ($action == 'USER_DELETE') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("UserDeleted", $object->login); $desc = $langs->transnoentities("UserDeleted", $object->login); } elseif ($action == 'GROUP_CREATE') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("NewGroupCreated", $object->name); $desc = $langs->transnoentities("NewGroupCreated", $object->name); } elseif ($action == 'GROUP_MODIFY') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("GroupModified", $object->name); $desc = $langs->transnoentities("GroupModified", $object->name); } elseif ($action == 'GROUP_DELETE') { dol_syslog("Trigger '" . $this->name . "' for action '{$action}' launched by " . __FILE__ . ". id=" . $object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $text = $langs->transnoentities("GroupDeleted", $object->name); $desc = $langs->transnoentities("GroupDeleted", $object->name); } // If not found /* else { dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } */ // Add entry in event table include_once DOL_DOCUMENT_ROOT . '/core/class/events.class.php'; $event = new Events($this->db); $event->type = $action; $event->dateevent = $date; $event->label = $text; $event->description = $desc; $event->user_agent = $_SERVER["HTTP_USER_AGENT"]; $result = $event->create($user); if ($result > 0) { return 1; } else { $error = "Failed to insert security event: " . $event->error; $this->error = $error; dol_syslog(get_class($this) . ": " . $this->error, LOG_ERR); return -1; } return 0; }
public function newAction() { if ($this->request->isPost()) { $messages = $this->formValidate(); if (count($messages)) { $this->view->disable(); $errorMsg = ''; foreach ($messages as $msg) { $errorMsg .= $msg . "<br>"; } $this->flash->error('<button type="button" class="close" data-dismiss="alert">×</button>' . $errorMsg); return $this->response->redirect('event/new/'); } else { $this->view->disable(); echo "validation is either failed or passed"; } $userSession = $this->session->get("userSession"); $eventName = $this->request->getPost("name"); $website = $this->request->getPost("website"); $telephone = $this->request->getPost("telephone"); $street = $this->request->getPost("street"); $city = $this->request->getPost("city"); $info = $this->request->getPost("event_info"); $category = $this->request->getPost("category"); $country = $this->request->getPost("country"); $raw_address = $this->request->getPost("address"); $latitude = $this->request->getPost("lat"); $longitude = $this->request->getPost("lng"); $dates = $this->request->getPost("date"); $fromTimes = $this->request->getPost("fromTime"); $toTimes = $this->request->getPost("toTime"); $event = new Events(); $event->created = date('Y-m-d H:i:s'); $event->modified = date('Y-m-d H:i:s'); $event->member_id = $userSession['id']; $event->name = $eventName; $event->event_date = $this->request->getPost("date"); $event->website = $website; $event->telephone = $telephone; $event->street = $street; $event->city = $city; $event->country_id = $country; $event->event_category_id = $category; $event->lng = $longitude; $event->lat = $latitude; $event->eventinfo = $info; if ($event->create()) { $id = $event->id; $i = 0; foreach ($dates as $date) { $eventDatetime = new EventDatetimes(); $eventDatetime->event_id = $id; $eventDatetime->date = $date; $eventDatetime->from_time = $fromTimes[$i]; $eventDatetime->to_time = $toTimes[$i]; $i++; if (!$eventDatetime->create()) { $this->view->disable(); echo "failed to insert event date and time in event_datetimes table. :("; } } $this->flash->success('<button type="button" class="close" data-dismiss="alert">×</button>New event has been posted'); if ($this->request->hasFiles() == true) { $uploads = $this->request->getUploadedFiles(); $isUploaded = false; $ctr = 1; foreach ($uploads as $upload) { # define a "unique" name and a path to where our file must go $fileName = $upload->getname(); $fileInfo = new SplFileInfo($fileName); $fileExt = $fileInfo->getExtension(); $fileExt = strtolower($fileExt); $newFileName = substr(md5(uniqid(rand(), true)), 0, 10) . date('ymdhis') . '.' . $fileExt; $fileImageExt = array('jpeg', 'jpg', 'png'); $fileType = ''; $filePath = ''; $path = ''; if (in_array($fileExt, $fileImageExt)) { $path = 'img/event/' . $newFileName; $filePath = 'img/event/'; //$fileType = 'Image'; } # move the file and simultaneously check if everything was ok $upload->moveTo($path) ? $isUploaded = true : ($isUploaded = false); if ($isUploaded) { $eventPhotos = new EventPhotos(); $eventPhotos->created = date('Y-m-d H:i:s'); $eventPhotos->modified = date('Y-m-d H:i:s'); $eventPhotos->member_id = $userSession['id']; $eventPhotos->event_id = $id; $eventPhotos->file_path = $filePath; $eventPhotos->filename = $newFileName; $eventPhotos->caption = $this->request->getPost('caption'); //$ctr++; if ($eventPhotos->create()) { echo "success"; } else { $this->view->disable(); print_r($eventPhotos->getMessages()); } } } } } else { $this->view->disable(); print_r($event->getMessages()); } return $this->response->redirect('event/view/' . $id); } $events = Events::find(); $categories = EventsCategories::find(); $countries = Countries::find(); $this->view->setVar('events', $events); $this->view->setVars(['events' => $events, 'categories' => $categories, 'countries' => $countries]); }
/** * Run Behavior factory when contoller is comletly loaded * @return void * @access public * @author Kaero * @copyright ImageCMS (c) 2012, Kaero <*****@*****.**> */ public function runFactory($eventAlias = null, $cleanQueue = false) { defined('BASEPATH') or exit('No direct script access allowed'); foreach (Events::create()->storage as $storageKey => $value) { if (!is_null($eventAlias) && $eventAlias != $storageKey) { continue; } if (isset($value['run'])) { if ($value['run'] === TRUE && isset($value['collable'])) { foreach ($value['collable'] as $collableKey => $run) { if ($run['isClosure'] === false) { call_user_func(array($run['collClass'], $run['collMethod']), $value['params']); } else { call_user_func($run['collMethod'], $value['params']); } if ($cleanQueue === true) { unset(Events::create()->storage[$storageKey]['collable'][$collableKey]); } } } } } // \CMSFactory\Events::create()->get(); }
public function run() { Events::create(['user_id' => 1, 'event' => 'enter', 'area' => 'Office']); }
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(); } } } } } } } } } } } } } } }