/var/www/projects/species/vendor/cakephp/cakephp/src/ORM/Table.php
toggle arguments
|
} |
|
$query->cache($cacheKey, $cacheConfig); |
|
} |
|
|
|
return $query->firstOrFail(); |
|
} |
|
|
|
/** |
|
* Handles the logic executing of a worker inside a transaction. |
/var/www/projects/species/src/Controller/TaxasController.php
toggle arguments
|
if ($taxa_id > MISSINGTAXA_START) $this->redirect(['action' => 'mtaxa', $taxa_id, $filter], 301); |
|
|
|
if (empty($filter) && $this->request->getData('Taxa.filter')) $filter = $this->request->getData('Taxa.filter'); |
|
|
|
$parent = $this->Taxas->get($taxa_id, ['contain' =>['Endangereds','Invasives','CommonNames','Attributes','TaxaEcoregions','TaxaEmblems','TaxaEcosystems', |
|
'TaxaHotspots','TaxaAzesites','TaxaBirdareas','Edges','Audios','Sabstracts','TaxaBreadcrumbs','Taxalinks','Webcams','Missingrels','TaxaVegclasses' |
|
]]); |
|
if (empty($parent)) { |
|
$this->Flash->error('Invalid Taxa id'); |
/var/www/projects/species/vendor/cakephp/cakephp/src/Controller/Controller.php
toggle arguments
|
} |
|
/* @var callable $callable */ |
|
$callable = [$this, $request->getParam('action')]; |
|
|
|
return $callable(...array_values($request->getParam('pass'))); |
|
} |
|
|
|
/** |
|
* Merge components, helpers vars from |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php
toggle arguments
|
if ($result instanceof Response) { |
|
return $result; |
|
} |
|
|
|
$response = $controller->invokeAction(); |
|
if ($response !== null && !($response instanceof Response)) { |
|
throw new LogicException('Controller actions can only return Cake\Http\Response or null.'); |
|
} |
|
|
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php
toggle arguments
|
} else { |
|
$controller = $this->factory->create($request, $response); |
|
} |
|
|
|
$response = $this->_invoke($controller); |
|
if ($request->getParam('return')) { |
|
return $response; |
|
} |
|
|
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/BaseApplication.php
toggle arguments
|
* @return \Psr\Http\Message\ResponseInterface |
|
*/ |
|
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next) |
|
{ |
|
return $this->getDispatcher()->dispatch($request, $response); |
|
} |
|
|
|
/** |
|
* Get the ActionDispatcher. |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/projects/species/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php
toggle arguments
|
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $next($request, $response); |
|
} |
|
$matching[] = $next; |
|
$middleware = new MiddlewareQueue($matching); |
|
$runner = new Runner(); |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/projects/species/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php
toggle arguments
|
public function __invoke($request, $response, $next) |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $next($request, $response); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $next($request, $response); |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/projects/species/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php
toggle arguments
|
*/ |
|
public function __invoke($request, $response, $next) |
|
{ |
|
try { |
|
return $next($request, $response); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request, $response); |
|
} catch (Exception $exception) { |
|
return $this->handleException($exception, $request, $response); |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
{ |
|
$this->middleware = $middleware; |
|
$this->index = 0; |
|
|
|
return $this->__invoke($request, $response); |
|
} |
|
|
|
/** |
|
* @param \Psr\Http\Message\ServerRequestInterface $request The server request |
/var/www/projects/species/vendor/cakephp/cakephp/src/Http/Server.php
toggle arguments
|
} |
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
$middleware->add($this->app); |
|
|
|
$response = $this->runner->run($middleware, $request, $response); |
|
|
|
if (!($response instanceof ResponseInterface)) { |
|
throw new RuntimeException(sprintf( |
|
'Application did not create a response. Got "%s" instead.', |
/var/www/projects/species/webroot/index.php
toggle arguments
|
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
If you want to customize this error message, create
src/Template/Error/error500.ctp