/var/www/mirkoles.com/app/vendor/mindy/http/src/Mindy/Http/Traits/HttpErrors.php(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/mirkoles.com/app/Modules/Mir/Controllers/ModelTyreController.php(77):
Mindy\Controller\BaseController ->
error
404
echo $this->render('mir/tyre/producer_page.html', [ 'producer' => $producer, 'models' => $models, 'title' =>$title ]); } public function actionModelPage($producer, $model) { $model = urldecode($model); $producer = urldecode($producer); $model = ModelTyre::objects()->filter([ 'name' => $model, 'producer_tyre__name' => $producer ])->limit(1)->get(); if (!$model) { $this->error(404); } $availIds = AvailTyre::objects()->filter(['tyre__model_tyre_id'=>$model->id])->valuesList(['tyre_id'],true); $temp = Tyre::objects()->filter(['model_tyre' => $model,'id__in'=>$availIds])->order(['radius', 'width'])->all(); $sizes = []; foreach ($temp as $size) { $rad = floatval($size->radius); $rad = (string)$rad; if (!isset($sizes[$rad])) { $sizes[$rad] = []; } $sizes[$rad][] = $size; } $avail['yes']=AvailTyre::objects()->filter(['tyre__model_tyre_id'=>$model->id,'storage__remote'=>0])->valuesList(['tyre_id'],true); $avail['no']=AvailTyre::objects()->filter(['tyre__model_tyre_id'=>$model->id,'storage__remote'=>1])->valuesList(['tyre_id'],true); //d($avail); $producer = $model->producer_tyre; |
#1 unknown(0):
Modules\Mir\Controllers\ModelTyreController ->
actionModelPage
"Matador", null
|
#2 /var/www/mirkoles.com/app/vendor/mindy/controller/src/Mindy/Controller/Action.php(129):
ReflectionMethod ->
invokeArgs
Modules\Mir\Controllers\ModelTyreController, array("Matador", "MP%252046%2520HECTORRA%25202")
$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; } } |
#3 /var/www/mirkoles.com/app/vendor/mindy/controller/src/Mindy/Controller/InlineAction.php(64):
Mindy\Controller\Action ->
runWithParamsInternal
Modules\Mir\Controllers\ModelTyreController, ReflectionMethod, array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202")
$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(); } } } |
#4 /var/www/mirkoles.com/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(425):
Mindy\Controller\InlineAction ->
runWithParams
array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202")
} /** * 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) |
#5 /var/www/mirkoles.com/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(401):
Mindy\Controller\BaseController ->
runAction
Mindy\Controller\InlineAction, array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202")
} } /** * 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 = []) { |
#6 /var/www/mirkoles.com/app/vendor/mindy/controller/src/Mindy/Controller/BaseController.php(380):
Mindy\Controller\BaseController ->
runActionWithFilters
Mindy\Controller\InlineAction, array(), array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202")
} /** * 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 */ |
#7 /var/www/mirkoles.com/app/vendor/mindy/application/src/Mindy/Application/Application.php(113):
Mindy\Controller\BaseController ->
run
"modelPage", array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202")
/** * Creates the controller and performs the specified action. * @param string $route the route of the current request. See {@link createController} for more details. * @throws HttpException if the controller could not be created. */ public function runController($route) { if (($ca = $this->createController($route)) !== null) { list($controller, $actionID, $params) = $ca; $_GET = array_merge($_GET, $params); $csrfExempt = $controller->getCsrfExempt(); if(!Console::isCli() && !in_array($actionID, $csrfExempt) && $this->getComponent('request')->enableCsrfValidation) { $this->getComponent('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> |
#8 /var/www/mirkoles.com/app/vendor/mindy/application/src/Mindy/Application/Application.php(71):
Mindy\Application\Application ->
runController
array(array("\Modules\Mir\Controllers\ModelTyreController", "modelPage"), array("producer" => "Matador", "model" => "MP%252046%2520HECTORRA%25202"))
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() { |
#9 /var/www/mirkoles.com/app/vendor/mindy/application/src/Mindy/Application/BaseApplication.php(539):
Mindy\Application\Application ->
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); } |
#10 /var/www/mirkoles.com/www/index.php(25):
Mindy\Application\BaseApplication ->
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(); |