Class: | Phact\Controller\Controller |
File: | /vendor/phact-cmf/phact/src/Phact/Controller/Controller.php |
150 |
$filter = ['id' => $filter]; |
151 |
} |
152 |
$model = $class::objects()->filter($filter)->get(); |
153 |
if (!$model) { |
154 |
$this->error(404); |
155 |
} |
156 |
return $model; |
157 |
} |
158 |
} |
Class: | Phact\Controller\Controller |
File: | /Modules/Catalog/Controllers/ProductController.php |
25 |
{ |
26 |
public function index($slug) |
27 |
{ |
28 |
/** @var Product $product */ |
29 |
$product = $this->getOr404(Product::class, ['slug' => $slug]); |
30 |
Product::objects()->filter(['slug' => $slug])->update([ |
31 |
'view'=>$product->view++ |
32 |
]); |
33 |
|
34 |
|
Class: | ReflectionMethod |
File: | /vendor/phact-cmf/phact/src/Phact/Controller/Controller.php |
94 |
throw new InvalidConfigException("Param {$name} for action {$action} in controller {$class} must be defined. Please, check your routes."); |
95 |
} |
96 |
} |
97 |
$this->eventTrigger("controller.beforeAction", [$ps, $params], $this); |
98 |
$response = $method->invokeArgs($this, $ps); |
99 |
} else { |
100 |
$this->eventTrigger("controller.beforeAction", [$ps, $params], $this); |
101 |
$response = $this->{$action}(); |
102 |
} |
103 |
$this->eventTrigger("controller.afterAction", [$ps, $params, $response], $this); |
Class: | Phact\Controller\Controller |
File: | /vendor/phact-cmf/phact/src/Phact/Controller/Controller.php |
60 |
$this->beforeAction($action, $params); |
61 |
|
62 |
if (method_exists($this, $action)) { |
63 |
|
64 |
return $this->runAction($action, $params); |
65 |
} else { |
66 |
|
67 |
$class = self::class; |
68 |
|
69 |
throw new InvalidConfigException("There is no action {$action} in controller {$class}"); |
Class: | Phact\Controller\Controller |
File: | /vendor/phact-cmf/phact/src/Phact/Application/Application.php |
269 |
$controller = new $controllerClass($this->request); |
270 |
|
271 |
$this->eventTrigger("application.beforeRunController", [$controller, $action, $name, $params], $this); |
272 |
|
273 |
$matched = $controller->run($action, $params); |
274 |
|
275 |
$this->eventTrigger("application.afterRunController", [$controller, $action, $name, $params, $matched], $this); |
276 |
|
277 |
} elseif (is_callable($match['target'])) { |
278 |
$fn = $match['target']; |
Class: | Phact\Application\Application |
File: | /vendor/phact-cmf/phact/src/Phact/Application/Application.php |
210 |
|
211 |
public function handleRequest() |
212 |
{ |
213 |
if ($this->getIsWebMode()) { |
214 |
$this->handleWebRequest(); |
215 |
} else { |
216 |
$this->handleCliRequest(); |
217 |
} |
218 |
} |
219 |
|
Class: | Phact\Application\Application |
File: | /vendor/phact-cmf/phact/src/Phact/Application/Application.php |
196 |
register_shutdown_function([$this, 'end'], 0); |
197 |
|
198 |
$this->logDebug("Start handling request"); |
199 |
|
200 |
$this->handleRequest(); |
201 |
$this->end(); |
202 |
} |
203 |
|
204 |
public function end($status = 0, $response = null) |
205 |
{ |
Class: | Phact\Application\Application |
File: | /home/a/alexa4ar/myfabrizio.ru/WWW/index.php |
29 |
//d($config); |
30 |
|
31 |
\Phact\Main\Phact::init($config); |
32 |
// |
33 |
\Phact\Main\Phact::app()->run(); |
34 |
|
35 |
//function my_dump($data, $full = null) |
36 |
//{ |
37 |
// |
38 |
// |