Action.
@throws \Pururin\Exceptions\PururinException
@return bool
191029
public function action()
	{
		$ch = new Curl($this->ins->url);
		$ch->setOpt(
			[
				CURLOPT_FOLLOWLOCATION => true
			]
		);
		$out = $ch->exec();
		if ($ch->errno()) {
			throw new PururinException($ch->error(), 1);
		}
		$this->raw = $out;
		return true;
	}
1357350
public function handle()
    {
        if (parent::handle() === false) return false;

        $this->createTest();
        if (!$this->option('api')) $this->generateView();
        $this->generateTranslation();
        $this->appendRouteFile();

        return null;
    }
1105036
public function run()
    {
        $events = $this->events;
        $event  = $this->event;

        // Define callback used to determine whether or not to short-circuit
        $shortCircuit = function($r) use ($event) {
            if ($r instanceof ResponseInterface) {
                return true;
            }
            if ($event->getError()) {
                return true;
            }

            return false;
        };

        // Prepare route event
        $event->setName(MvcEvent::EVENT_ROUTE);
        $event->stopPropagation(false); // Clear before triggering

        // Trigger route event
        try {
            $result = $events->triggerEventUntil($shortCircuit, $event);
        } catch (Throwable $e) {
            return $this->handleException($e, $event, $events);
        } catch (Exception $e) {
            return $this->handleException($e, $event, $events);
        }

        if ($result->stopped()) {
            $response = $result->last();

            if ($response instanceof ResponseInterface) {
                return $this->completeResponse($events, $event, $response);
            }
        }

        if ($event->getError()) {
            return $this->completeRequest($event);
        }

        // Prepare dispatch event
        $event->setName(MvcEvent::EVENT_DISPATCH);
        $event->stopPropagation(false); // Clear before triggering

        // Trigger dispatch event
        $result = $events->triggerEventUntil($shortCircuit, $event);

        // Complete response
        $response = $result->last();

        if ($response instanceof ResponseInterface) {
            return $this->completeResponse($events, $event, $response);
        }

        $response = $this->response;

        $event->setResponse($response);

        return $this->completeRequest($event);
    }
430178
public function detectAndExecute()
    {
        // Get the controller
        if (!($controller = $this->detectController())) {
            return false;
        }

        // Get the action
        $action = $this->detectAction();
        if (!$action || !method_exists($controller, $action)) {
            return false;
        }

        // Get the id
        $id = $this->detectId();

        // Tell other classes what was found
        $event = Event::fire('wildcard.detection', [
            $controller, $action, $id
        ]);

        // Instantiate controller
        $controller = new $controller();
        if ($parent = $this->detectParent()) {
            list($parent_slug, $parent_id) = $parent;
            $parent_model = 'App\\'.Str::singular(Str::studly($parent_slug));
            $controller->parent($parent_model::findOrFail($parent_id));
        }

        // Execute the request
        $params = $id ? [$id] : [];
        return $controller->callAction($action, $params);
    }
219280
public function run()
    {
        if (is_object($this->connection())) {
            try {
                $stmt = $this->connection()->prepare($this->schema);

                if ($this->checkSchemaExistence) {
                    return $stmt->rowCount();
                } elseif ($return = $stmt->execute()) {
                    return $return;
                } else {
                    return false;
                }
            } catch (\PDOException $e) {
                throw new \Exception($e->getMessage());
            }
        }
    }
93058
public function run()
    {
        if ('action' === $this->getModel()->getType()) {
            return add_action($this->getModel()->getIdentifier(), $this->getModel()->getCallback(), $this->getModel()->getPriority());
        }

        return add_filter($this->getModel()->getIdentifier(), $this->getModel()->getCallback(), $this->getModel()->getPriority());
    }
1235690
protected function callAction()
    {
        $environment = $this->getEnvironment();
        $action      = new Action($environment->getInputProvider()->getParameter('act') ?: 'showAll');

        return $environment->getController()->handle($action);
    }
867776
private function execute()
	{
		if ($this->currentRoute == null) {
			$this->router->getRoute('error_page')->setAction('_notFound');
			$this->toRoute('error_page');
			return;
		}
		$controllerName = $this->currentRoute->getController();
		if ($controllerName == '') {
			if ($this->currentRoute->getParams() != null && array_key_exists('controller', $this->currentRoute->getParams()))
				$controllerName = $this->currentRoute->getParams()['controller'];
			elseif ($this->currentRoute->getDefault() != null)
				$controllerName = $this->currentRoute->getDefault()->getController();
			else {
				throw new \Exception($this->translator->translate("The requested url has a bad route configuration!"));
			}
		}

		if (array_key_exists($controllerName, $this->invokable))
			$controllerName = $this->invokable[$controllerName];
		elseif (strpos($controllerName, 'decoy\base') === false)
			throw new \Exception('The requested Controller: \'' . $controllerName . '\' is not registered!');
		$c = new $controllerName($this);
		if ($c->getResult() && !in_array($c->identifier, $this->disableRender) && $this->enableRender) {
			echo $this->response->output($c);
		}
	}
903766
public function doAction($actionName)
    {
        if (isset($this->actions[$actionName]))
            return call_user_func_array(array($this, $this->actions[$actionName]), array());
    }
198531
public function action()
    {
        $token = isset($this->validationToken) ? $this->validationToken : get_class($this);
        $url = (string) call_user_func_array('parent::action', func_get_args());
        $url .= (strpos($url, '?') === false ? '?' : '&') . $this->app->make('token')->getParameter($token);

        return $url;
    }
1180799
public function indexAction()
    {
        return $this->forward()
                    ->dispatch(
                        $this->params()
                             ->fromRoute( 'controller', get_called_class() ),
                        array(
                            'action' => 'list',
                            'locale' => (string) $this->locale(),
                        )
                    );
    }
912950
public function action() {
		$this->load->language('information/gdpr');

		$json = array();

		if (isset($this->request->post['email'])) {
			$email = $this->request->post['email'];
		} else {
			$email = '';
		}

		if (isset($this->request->post['action'])) {
			$action = $this->request->post['action'];
		} else {
			$action = '';
		}

		// Validate E-Mail
		if ((utf8_strlen($email) > 96) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
			$json['error']['email'] = $this->language->get('error_email');
		}

		// Validate Action
		$allowed = array(
			'export',
			'remove'
		);

		if (!in_array($action, $allowed)) {
			$json['error']['action'] = $this->language->get('error_action');
		}

		if (!$json) {
			// Added additional check so people are not spamming requests
			$status = true;

			$this->load->model('account/gdpr');

			$results = $this->model_account_gdpr->getGdprsByEmail($email);

			foreach ($results as $result) {
				if ($result['action'] == $action) {
					$status = false;

					break;
				}
			}

			if ($status) {
				$this->model_account_gdpr->addGdpr(token(), $email, $action);
			}

			$json['success'] = $this->language->get('text_success');
		}

		$this->response->addHeader('Content-Type: application/json');
		$this->response->setOutput(json_encode($json));
	}
1131085
protected function currentAction()
    {
        $action = substr($action = Route::currentRouteAction(), strpos($action, '@') + 1);

        if (!method_exists($this, $action)) {
            $action = 'index';
        }

        return $action;
    }
575076
public function execute()
    {
        $success = false;

        try {
            $file = $this->getDirectory() . DIRECTORY_SEPARATOR . $this->getFilename();
            $phar = new PHPPhar($file, 0, $this->getFilename());
            $phar->buildFromDirectory($this->getPHPCI()->buildPath, $this->getRegExp());

            $stub = $this->getStubContent();
            if ($stub) {
                $phar->setStub($stub);
            }

            $success = true;
        } catch (Exception $e) {
            $this->getPHPCI()->log(Lang::get('phar_internal_error'));
            $this->getPHPCI()->log($e->getMessage());
        }

        return $success;
    }
76558
public function action() {
        if ($this->action instanceof moodle_url) {
            return $this->action;
        } else if ($this->action instanceof action_link) {
            return $this->action->url;
        }
        return $this->action;
    }
1168740
public function execute()
    {
        $controller = $this->getController();

        if (!$controller) {
            $controller = $this->factoryController();
            $this->setController($controller);
        }

        $this->prepareController($controller);

        $action = $this->getAction();

        if (!$controller->respondTo($action)) {
            throw new Exceptions\ActionNotFoundException(sprintf(
                "Action '%s::%s' was not defined",
                $controller->getClass(),
                $action
            ));
        }

        $controller->beforeAction();
        $controller->send($action);
        $controller->afterAction();

        return $controller->getResponse();
    }
812315
final public function execute() {
		if (!is_array($this->controller->accessRules()))
			throw new \Exception('Authentication failed: Method "accessRules" in "' .
				$this->controller->getClass() . '" must return an array');
		foreach ($this->controller->accessRules() as $rule) {
			if (!is_array($rule))
				throw new \Exception('Authentication error: Each element of the array returned by accessRules() must be an array');

			if (!isset($rule[0]))
				throw new \Exception('Authentication error: Each element of the array returned by accessRules() must indicate permission as its first element');

			$permission = $rule[0];
			$rules = (isset($rule[1])) ? $rule[1] : array();

			if (!is_string($permission) || (is_string($permission) && !in_array($permission, array('allow', 'deny'))))
				throw new \Exception('Authentication error: First element of each rules array can only be either "allow" or "deny"');
			if (isset($rules) && !is_array($rules))
				throw new \Exception('Authentication error: The second element of each rules array must return an array');

			if (strtolower($permission) === 'allow') {
				if ($this->checkPermission($rules) === TRUE)
					return true;
			}
			elseif (strtolower($permission) === 'deny') {
				if ($this->checkPermission($rules) === TRUE)
					return false;
			}
		}

		return true;
	}