define('PAGE_URL', $url);
define('PAGE_RECORD_ID', $page_record_id);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/web4s/src/Controller/AppController.php, line 230 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 231 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 232 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 233 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 234 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 235 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 236 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/src/Controller/AppController.php, line 237 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
define('PAGE_CODE', $code);
define('PAGE_VERSION', $version);
define [internal], line ?? App\Controller\AppController::beforeRender() /home/web4s/src/Controller/AppController.php, line 238 App\Controller\ErrorController::beforeRender() /home/web4s/src/Controller/ErrorController.php, line 64 Cake\Event\EventManager::_callListener() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager::dispatch() /home/web4s/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Controller\Controller::dispatchEvent() /home/web4s/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller::render() /home/web4s/vendor/cakephp/cakephp/src/Controller/Controller.php, line 759 Cake\Error\Renderer\WebExceptionRenderer::_outputMessage() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 421 Cake\Error\Renderer\WebExceptionRenderer::render() /home/web4s/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php, line 292 Cake\Error\Middleware\ErrorHandlerMiddleware::handleException() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 162 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/web4s/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Http\Runner::handle() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
if (!session_write_close()) {
throw new RuntimeException('Could not close the session');
session_write_close [internal], line ?? Cake\Http\Session::close() /home/web4s/vendor/cakephp/cakephp/src/Http/Session.php, line 393 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 93 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
if (!session_write_close()) {
throw new RuntimeException('Could not close the session');
session_write_close [internal], line ?? Cake\Http\Session::close() /home/web4s/vendor/cakephp/cakephp/src/Http/Session.php, line 393 Cake\Http\Server::run() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 93 [main] /home/live2018/domains/thanhtien-tte.com/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/web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\Server::emit() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
$response->getStatusCode(),
($reasonPhrase ? ' ' . $reasonPhrase : '')
));
header [internal], line ?? Cake\Http\ResponseEmitter::emitStatusLine() /home/web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter::emit() /home/web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\Server::emit() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
foreach ($values as $value) {
header(sprintf(
'%s: %s',
header [internal], line ?? Cake\Http\ResponseEmitter::emitHeaders() /home/web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter::emit() /home/web4s/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\Server::emit() /home/web4s/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/live2018/domains/thanhtien-tte.com/public_html/index.php, line 35
$connection = $this->_driver->getConnection(); |
|
|
|
try { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $this->_bufferResults); |
|
$result = $this->_statement->execute($params); |
|
} finally { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); |
|
} |
|
|
{ |
|
return $this->getDisconnectRetry()->run(function () use ($query) { |
|
$statement = $this->prepare($query); |
|
$query->getValueBinder()->attachTo($statement); |
|
$statement->execute(); |
|
|
|
return $statement; |
|
}); |
|
} |
{ |
|
$this->numRetries = 0; |
|
while (true) { |
|
try { |
|
return $action(); |
|
} catch (Exception $e) { |
|
if ( |
|
$this->numRetries < $this->maxRetries && |
|
$this->strategy->shouldRetry($e, $this->numRetries) |
$query->getValueBinder()->attachTo($statement); |
|
$statement->execute(); |
|
|
|
return $statement; |
|
}); |
|
} |
|
|
|
/** |
|
* Executes a SQL statement and returns the Statement object as result. |
* @return \Cake\Database\StatementInterface |
|
*/ |
|
public function execute(): StatementInterface |
|
{ |
|
$statement = $this->_connection->run($this); |
|
$this->_iterator = $this->_decorateStatement($statement); |
|
$this->_dirty = false; |
|
|
|
return $this->_iterator; |
|
|
return new $decorator($this->_results); |
|
} |
|
|
|
$statement = $this->getEagerLoader()->loadExternal($this, $this->execute()); |
|
|
|
return new ResultSet($this, $statement); |
|
} |
|
|
if ($this->_cache) { |
|
$results = $this->_cache->fetch($this); |
|
} |
|
if ($results === null) { |
|
$results = $this->_decorateResults($this->_execute()); |
|
if ($this->_cache) { |
|
$this->_cache->store($this, $results); |
|
} |
|
} |
'You cannot call all() on a non-select query. Use execute() instead.' |
|
); |
|
} |
|
|
|
return $this->_all(); |
|
} |
|
|
|
/** |
|
* Trigger the beforeFind event on the query's repository object. |
$data = $this->extractData($object, $params, $settings); |
|
$query = $this->getQuery($object, $query, $data); |
|
|
|
$cleanQuery = clone $query; |
|
$results = $query->all(); |
|
$data['numResults'] = count($results); |
|
$data['count'] = $this->getCount($cleanQuery, $data); |
|
|
|
$pagingParams = $this->buildParams($data); |
public function paginate(object $object, array $settings = []): ResultSetInterface
|
|
{
|
|
try {
|
|
$results = $this->_paginator->paginate(
|
|
$object,
|
|
[],
|
|
$settings
|
|
);
|
|
|
}else{
|
|
try {
|
|
$products = $this->PaginatorExtend->paginate($table->queryListProducts($params), [
|
|
'limit' => $number_record,
|
|
'page' => $page
|
|
])->toArray();
|
|
} catch (Exception $e) {
|
|
$products = $this->PaginatorExtend->paginate($table->queryListProducts($params), [
|
|
'limit' => $number_record,
|
$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;
|
|
|
}
|
|
|
|
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 ' |
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
/** @var mixed $response */ |
|
$response = $handler->handle($request); |
|
|
|
return $this->_addTokenCookie($token, $request, $response); |
|
} |
|
|
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