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(); } } } } } } } } } } } } } } }