define('PAGE_URL', $url);define('PAGE_RECORD_ID', $page_record_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 321 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_URL', $url);define('PAGE_RECORD_ID', $page_record_id);define('PAGE_TAG_ID', $tag_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 322 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_RECORD_ID', $page_record_id);define('PAGE_TAG_ID', $tag_id);define('PAGE_CATEGORY_ID', $page_category_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 323 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_TAG_ID', $tag_id);define('PAGE_CATEGORY_ID', $page_category_id);define('PAGE_BRAND_ID', $page_brand_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 324 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_CATEGORY_ID', $page_category_id);define('PAGE_BRAND_ID', $page_brand_id);define('PAGE_CATEGORIES_ID', $page_categories_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 325 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_BRAND_ID', $page_brand_id);define('PAGE_CATEGORIES_ID', $page_categories_id);define('PAGE_TYPE', $type);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 326 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_CATEGORIES_ID', $page_categories_id);define('PAGE_TYPE', $type);define('PAGE_CODE', $code);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 327 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_TYPE', $type);define('PAGE_CODE', $code);define('PAGE_VERSION', $version);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 328 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
define('PAGE_CODE', $code);define('PAGE_VERSION', $version);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/core_web4s/src/Controller/AppController.php, line 329 App\Controller\ErrorController::beforeRender() /home/core_web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/core_web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/core_web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 760 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/core_web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
$message = "Unable to emit headers. Headers sent in file=$file line=$line";trigger_error($message, E_USER_WARNING);}
Cake\Http\ResponseEmitter::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\Server::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
$response->getStatusCode(),($reasonPhrase ? ' ' . $reasonPhrase : '')));
header [internal], line ?? Cake\Http\ResponseEmitter::emitStatusLine() /home/core_web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\Server::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
foreach ($values as $value) {header(sprintf('%s: %s',
header [internal], line ?? Cake\Http\ResponseEmitter::emitHeaders() /home/core_web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\Server::emit() /home/core_web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/quangninh/domains/quangninh.web4s.vn/public_html/index.php, line 35
id is missing operator (IS, IS NOT) with null value.
📋
continue; |
|
} |
|
|
|
if (!$numericKey) { |
|
$this->_conditions[] = $this->_parseCondition($k, $c); |
|
} |
|
} |
|
} |
|
|
|
|
return $this; |
|
} |
|
|
|
$this->_addConditions($conditions, $types); |
|
|
|
return $this; |
|
} |
|
|
$append = $append($this->newExpr(), $this); |
|
} |
|
|
|
if ($expression->getConjunction() === $conjunction) { |
|
$expression->add($append, $types); |
|
} else { |
|
$expression = $this->newExpr() |
|
->setConjunction($conjunction) |
|
->add([$expression, $append], $types); |
{ |
|
if ($overwrite) { |
|
$this->_parts['where'] = $this->newExpr(); |
|
} |
|
$this->_conjugate('where', $conditions, 'AND', $types); |
|
|
|
return $this; |
|
} |
|
|
|
|
if(PAGE_TYPE == LANDING){
|
|
$categorie_info = TableRegistry::get('Categories')->find()->where([
|
|
'id' => PAGE_RECORD_ID,
|
|
'type' => LANDING
|
|
])->select(['category_product_ids'])->first();
|
|
if(empty($categorie_info)) return $result;
|
|
|
|
$categorie_ids = !empty($categorie_info['category_product_ids']) ? $categorie_info['category_product_ids'] : [];
|
$result = $this->blockBrand($block_info);
|
|
break;
|
|
|
|
case PRODUCT:
|
|
$result = $this->blockListProducts($block_info, $params_url_filter);
|
|
break;
|
|
|
|
case PRODUCT_DETAIL:
|
|
$result = $this->blockDetailProduct($block_info);
|
|
|
}
|
|
|
|
// get data of block
|
|
$block_info['data_block'] = $block_component->getDataBlock($block_info);
|
|
|
|
// check block use cache
|
|
$cache_block = !empty($config['cache']) ? true : false;
|
|
if(!$cache_block){
|
$devive = DEVICE;
|
|
if(!empty(TABLET)){
|
|
$devive = 2;
|
|
}
|
|
$structure_page = $this->getStructurePage(PAGE_CODE, $devive, true, PAGE_RECORD_ID);
|
|
$blocks = !empty($structure_page['blocks']) ? $structure_page['blocks'] : [];
|
|
$structure = !empty($structure_page['structure']) ? $structure_page['structure'] : [];
|
|
$cache_page = !empty($structure_page['cache']) ? true : false;
|
|
|
$session = $this->request->getSession();
|
|
|
|
if(!empty($code)){
|
|
// get structure of page
|
|
$structure_page = $this->getDataForTemplate();
|
|
$blocks = !empty($structure_page['blocks']) ? $structure_page['blocks'] : [];
|
|
$structure = !empty($structure_page['structure']) ? $structure_page['structure'] : [];
|
|
$cache_page = !empty($structure_page['cache']) ? true : false;
|
|
|
protected function _callListener(callable $listener, EventInterface $event) |
|
{ |
|
$data = (array)$event->getData(); |
|
|
|
return $listener($event, ...array_values($data)); |
|
} |
|
|
|
/** |
|
* @inheritDoc |
foreach ($listeners as $listener) { |
|
if ($event->isStopped()) { |
|
break; |
|
} |
|
$result = $this->_callListener($listener['callable'], $event); |
|
if ($result === false) { |
|
$event->stopPropagation(); |
|
} |
|
if ($result !== null) { |
} |
|
|
|
/** @var \Cake\Event\EventInterface $event */ |
|
$event = new $this->_eventClass($name, $subject, $data); |
|
$this->getEventManager()->dispatch($event); |
|
|
|
return $event; |
|
} |
|
} |
if ($layout !== null) { |
|
$builder->setLayout($layout); |
|
} |
|
|
|
$event = $this->dispatchEvent('Controller.beforeRender'); |
|
if ($event->getResult() instanceof Response) { |
|
return $event->getResult(); |
|
} |
|
if ($event->isStopped()) { |
}
|
|
|
|
public function index()
|
|
{
|
|
$this->render('index');
|
|
}
|
|
|
|
public function notFound()
|
|
{
|
* @throws \UnexpectedValueException If return value of action is not `null` or `ResponseInterface` instance. |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null && !$result instanceof ResponseInterface) { |
|
throw new UnexpectedValueException(sprintf( |
|
'Controller actions can only return ResponseInterface instance or null. ' |
|
. 'Got %s instead.', |
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result instanceof ResponseInterface) { |
|
return $result; |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
} |
|
|
|
$controller = $this->controllerFactory->create($request); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
$this->_validateToken($request); |
|
$request = $this->_unsetTokenField($request); |
|
} |
|
|
|
return $handler->handle($request); |
|
} |
|
|
|
/** |
|
* Set callback for allowing to skip token check for particular request. |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
) { |
|
Router::setRequest($request); |
|
} |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
|
|
$middleware = new MiddlewareQueue($matching); |
|
$runner = new Runner(); |
|
|
|
return $runner->run($middleware, $request, $handler); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
) { |
|
Router::setRequest($request); |
|
} |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
// Bind your application to the server.
|
|
$server = new Server(new Application($core_path . '/config'));
|
|
|
|
// Run the request/response through the application and emit the response.
|
|
$server->emit($server->run());
|
|
|
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
Please try correcting the issue for the following table aliases:
If you want to customize this error message, create templates/Error/error500.php