Mindy\Exception\HttpException(34)
$codes = [ 400 => $t->t('main', 'Invalid request. Please do not repeat this request again.'), 403 => $t->t('main', 'You are not authorized to perform this action.'), 404 => $t->t('main', 'The requested page does not exist.'), 500 => $t->t('main', 'Error'), ]; return isset($codes[$code]) ? $codes[$code] : 'Unknown error'; } /** * @param $code * @param null $message * @throws HttpException */ public function error($code, $message = null) { // CoreModule::t($message === null ? $codes[$code] : $message, [], 'errors') throw new HttpException($code, $message === null ? $this->errorMessage($code) : $message); } }
#0 /var/www/u5433537/data/www/app/Modules/Core/Controllers/CoreController.php(199):
Mindy\Controller\BaseController ->
error
404
{ if (!is_array($params)) { $params = ['pk' => $params]; } if (is_string($object)) { $object = new $object; } $model = null; if ($object instanceof Model) { $model = $object->objects()->get($params); } elseif ($object instanceof Manager || $object instanceof QuerySet) { $model = $object->get($params); } if ($model === null) { $this->error(404); } return $model; } public function end() { Mindy::app()->end(); } } |
#1 /var/www/u5433537/data/www/app/Modules/Target/Controllers/MainController.php(31):
Modules\Core\Controllers\CoreController ->
getOr404
"Modules\Target\Models\Services", array("slug" => "bazovyi-kurs-ot-3450-r")
use Modules\Core\Controllers\CoreController; use Modules\Pages\Models\Block; use Modules\Target\Forms\FeedbackForm; use Modules\Target\Forms\RequestOrderForm; use Modules\Target\Forms\ServicesRequestForm; use Modules\Target\Models\Guns; use Modules\Target\Models\Services; class MainController extends CoreController { public function actionIndex() { echo $this->render('target/index.html'); } public function actionCall($slug) { $service = $this->getOr404(Services::className(), ['slug' => $slug]); $form = new ServicesRequestForm(); if (isset($_POST['ServicesRequestForm'])) { $form->populate($_POST); $form->setAttributes(['services' => $service]); if ($form->isValid() && $form->save()) { Mindy::app()->mail->fromCode('service.order', ParamsHelper::get('core.core.email_owner'), [ 'model' => $form->getInstance(), ]); echo $this->render('/target/success_service.html', [ 'model'=>$service ]); |
#2 unknown(0):
Modules\Target\Controllers\MainController ->
actionCall
"bazovyi-kurs-ot-3450-r"
|
#3 /var/www/u5433537/data/www/app/vendor/mindy/controller/src/Mindy/Controller/Action.php(109):
ReflectionMethod ->
invokeArgs
Modules\Target\Controllers\MainController, array("bazovyi-kurs-ot-3450-r")
$ps = []; foreach ($method->getParameters() as $i => $param) { $name = $param->getName(); if (isset($params[$name])) { if ($param->isArray()) { $ps[] = is_array($params[$name]) ? $params[$name] : [$params[$name]]; } elseif (!is_array($params[$name])) { $ps[] = $params[$name]; } else { return false; } } elseif ($param->isDefaultValueAvailable()) { $ps[] = $param->getDefaultValue(); } else { return false; } } $method->invokeArgs($object, $ps); return true; } } |
#4 /var/www/u5433537/data/www/app/vendor/mindy/controller/src/Mindy/Controller/InlineAction.php(42):
Mindy\Controller\Action ->
runWithParamsInternal
Modules\Target\Controllers\MainController, ReflectionMethod, array("slug" => "bazovyi-kurs-ot-3450-r")
$method = 'action' . $this->getId(); $this->getController()->$method(); } /** * Runs the action with the supplied request parameters. * This method is internally called by {@link CController::runAction()}. * @param array $params the request parameters (name=>value) * @return boolean whether the request parameters are valid * @since 1.1.7 */ public function runWithParams($params) { $methodName = 'action' . $this->getId(); $controller = $this->getController(); $method = new ReflectionMethod($controller, $methodName); if ($method->getNumberOfParameters() > 0) { return $this->runWithParamsInternal($controller, $method, $params); } else { return $controller->$methodName(); } } } |
#5 /var/www/u5433537/data/www/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(417):
Mindy\Controller\InlineAction ->
runWithParams
array("slug" => "bazovyi-kurs-ot-3450-r")
} /** * Runs the action after passing through all filters. * This method is invoked by {@link runActionWithFilters} after all possible filters have been executed * and the action starts to run. * @param Action $action action to run * @param array $params */ public function runAction($action, $params = []) { $priorAction = $this->_action; $this->_action = $action; $signal = Mindy::app()->signal; $results = $signal->send($this, 'beforeAction', $this, $action); if ($results->getLast()->value) { ob_start(); if ($action->runWithParams($params) === false) { ob_end_clean(); $this->invalidActionParams($action); } else { $signal->send($this, 'afterAction', $action, ob_get_clean()); } } $this->_action = $priorAction; } /** * This method is invoked when the request parameters do not satisfy the requirement of the specified action. * The default implementation will throw a 400 HTTP exception. * @param Action $action the action being executed * @throws \Mindy\Exception\HttpException * @since 1.1.7 */ public function invalidActionParams($action) |
#6 /var/www/u5433537/data/www/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(393):
Mindy\Controller\BaseController ->
runAction
Mindy\Controller\InlineAction, array("slug" => "bazovyi-kurs-ot-3450-r")
} } /** * Runs an action with the specified filters. * A filter chain will be created based on the specified filters * and the action will be executed then. * @param Action $action the action to be executed. * @param array $filters list of filters to be applied to the action. * @param array $params * @see filters * @see createAction * @see runAction */ public function runActionWithFilters($action, $filters, $params = []) { if (empty($filters)) { $this->runAction($action, $params); } else { $priorAction = $this->_action; $this->_action = $action; FilterChain::create($this, $action, $filters)->run($params); $this->_action = $priorAction; } } /** * Runs the action after passing through all filters. * This method is invoked by {@link runActionWithFilters} after all possible filters have been executed * and the action starts to run. * @param Action $action action to run * @param array $params */ public function runAction($action, $params = []) { |
#7 /var/www/u5433537/data/www/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(372):
Mindy\Controller\BaseController ->
runActionWithFilters
Mindy\Controller\InlineAction, array(), array("slug" => "bazovyi-kurs-ot-3450-r")
} /** * Runs the named action. * Filters specified via {@link filters()} will be applied. * @param string $actionID action ID * @param array $params * @see filters * @see createAction * @see runAction */ public function run($actionID, $params = []) { if (($action = $this->createAction($actionID)) !== null) { $signal = Mindy::app()->signal; $signal->send($this, 'beforeAction', $this, $action); ob_start(); $this->runActionWithFilters($action, $this->filters(), $params); $signal->send($this, 'afterAction', $action, ob_get_clean()); } else { $this->missingAction($actionID); } } /** * Runs an action with the specified filters. * A filter chain will be created based on the specified filters * and the action will be executed then. * @param Action $action the action to be executed. * @param array $filters list of filters to be applied to the action. * @param array $params * @see filters * @see createAction * @see runAction */ |
#8 /var/www/u5433537/data/www/app/vendor/mindy/application/src/Mindy/Application/Application.php(119):
Mindy\Controller\BaseController ->
run
"call", array("slug" => "bazovyi-kurs-ot-3450-r")
public function runController($route) { if (($ca = $this->createController($route)) !== null) { /** @var \Mindy\Controller\BaseController $controller */ list($controller, $actionID, $params) = $ca; $_GET = array_merge($_GET, $params); $csrfExempt = $controller->getCsrfExempt(); if (Console::isCli() === false && in_array($actionID, $csrfExempt) === false) { /** @var \Mindy\Http\Request $request */ $request = $this->getComponent('request'); if ($request->enableCsrfValidation) { $request->csrf->validate(); } } $oldController = $this->_controller; $this->_controller = $controller; $controller->init(); $controller->run($actionID, $params); $this->_controller = $oldController; } else { throw new HttpException(404, Mindy::t('base', 'Unable to resolve the request "{route}".', [ '{route}' => $this->request->getPath() ])); } } /** * Creates a controller instance based on a route. * The route should contain the controller ID and the action ID. * It may also contain additional GET variables. All these must be concatenated together with slashes. * * This method will attempt to create a controller in the following order: * <ol> * <li>If the first segment is found in {@link controllerMap}, the corresponding * controller configuration will be used to create the controller;</li> |
#9 /var/www/u5433537/data/www/app/vendor/mindy/application/src/Mindy/Application/Application.php(71):
Mindy\Application\Application ->
runController
array(array("\Modules\Target\Controllers\MainController", "call"), array("slug" => "bazovyi-kurs-ot-3450-r"))
private $_controller; /** * Processes the current request. * It first resolves the request into controller and action, * and then creates the controller to perform the action. */ public function processRequest() { $this->signal->send($this, 'onProcessRequest'); if (Console::isCli()) { $exitCode = $this->_runner->run($_SERVER['argv']); if (is_int($exitCode)) { $this->end($exitCode); } } else { $this->runController($this->parseRoute()); } } /** * @return \Mindy\Router\Route */ public function parseRoute() { return $this->getUrlManager()->parseUrl($this->getRequest()); } /** * @throws \Mindy\Exception\Exception * @return \Modules\User\Models\User instance the user session information */ public function getUser() { |
#10 /var/www/u5433537/data/www/app/vendor/mindy/application/src/Mindy/Application/BaseApplication.php(545):
Mindy\Application\Application ->
processRequest
if ($this->getLocator()->has($name)) { return $this->getLocator()->get($name); } else { return $this->__getInternal($name); } } /** * Runs the application. * This method loads static application components. Derived classes usually overrides this * method to do more application-specific tasks. * Remember to call the parent implementation so that static application components are loaded. */ public function run() { $this->signal->send($this, 'beginRequest', $this); register_shutdown_function([$this, 'end'], 0, false); $this->processRequest(); $this->signal->send($this, 'endRequest', $this); } /** * Terminates the application. * This method replaces PHP's exit() function by calling * {@link onEndRequest} before exiting. * @param integer $status exit status (value 0 means normal exit while other values mean abnormal exit). * @param boolean $exit whether to exit the current request. This parameter has been available since version 1.1.5. * It defaults to true, meaning the PHP's exit() function will be called at the end of this method. */ public function end($status = 0, $exit = true) { $this->signal->send($this, 'endRequest', $this); if ($exit) { exit($status); } |
#11 /var/www/u5433537/data/www/clubtarget.ru/index.php(26):
Mindy\Application\BaseApplication ->
run
defined('MINDY_ENABLE_ERROR_HANDLER') or define('MINDY_ENABLE_ERROR_HANDLER', true); defined('MINDY_ENABLE_EXCEPTION_HANDLER') or define('MINDY_ENABLE_EXCEPTION_HANDLER', true); ini_set('error_reporting', -1); } $config = MINDY_PATH . '../app/config/settings'; if (is_file($config . '_local.php')) { $config .= '_local'; } // Composer autoloader if (!is_file(MINDY_PATH . '../app/vendor/autoload.php')) { throw new Exception("Please run 'composer install' in app/ directory"); } include(MINDY_PATH . '../app/vendor/autoload.php'); $app = \Mindy\Base\Mindy::getInstance($config . '.php'); $app->run(); |