]); |
|
} |
|
$callable = [$this, $request->params['action']]; |
|
|
|
return call_user_func_array($callable, $request->params['pass']); |
|
} |
|
|
|
/** |
|
* Merge components, helpers vars from |
[
(int) 0 => object(Kreezalid\Page\Controller\PagesController) {
name => 'Pages'
helpers => []
request => object(Cake\Network\Request) {}
response => object(Cake\Network\Response) {}
paginate => []
autoRender => true
components => []
View => null
plugin => 'Kreezalid/Page'
passedArgs => [
(int) 0 => 'uploads',
(int) 1 => 'ecomedia',
(int) 2 => '868986.jpg'
]
modelClass => 'Kreezalid/Page.Pages'
viewClass => null
viewVars => []
RequestHandler => object(Cake\Controller\Component\RequestHandlerComponent) {}
Flash => object(Cake\Controller\Component\FlashComponent) {}
Cookie => object(Cake\Controller\Component\CookieComponent) {}
Auth => object(Cake\Controller\Component\AuthComponent) {}
RememberMe => object(Kreezalid\Users\Controller\Component\RememberMeComponent) {}
UsersAuth => object(Kreezalid\Users\Controller\Component\UsersAuthComponent) {}
Pages => object(Kreezalid\Page\Model\Table\PagesTable) {}
Redirections => object(Kreezalid\Page\Model\Table\RedirectionsTable) {}
[protected] _responseClass => 'Cake\Network\Response'
[protected] _components => object(Cake\Controller\ComponentRegistry) {}
[protected] _validViewOptions => [
(int) 0 => 'passedArgs'
]
[protected] _eventManager => object(Cake\Event\EventManager) {}
[protected] _eventClass => '\Cake\Event\Event'
[protected] _tableLocator => object(Cake\ORM\Locator\TableLocator) {}
[protected] _modelFactories => [
'Table' => [
[maximum depth reached]
]
]
[protected] _modelType => 'Table'
[protected] _viewBuilder => object(Cake\View\ViewBuilder) {}
},
(int) 1 => 'loadPage'
]
[
(int) 0 => 'uploads',
(int) 1 => 'ecomedia',
(int) 2 => '868986.jpg'
]
if ($result instanceof Response) { |
|
return $result; |
|
} |
|
|
|
$response = $controller->invokeAction(); |
|
if ($response !== null && !($response instanceof Response)) { |
|
throw new LogicException('Controller actions can only return Cake\Network\Response or null.'); |
|
} |
|
|
No arguments
} else { |
|
$controller = $this->factory->create($request, $response); |
|
} |
|
|
|
$response = $this->_invoke($controller); |
|
if (isset($request->params['return'])) { |
|
return $response; |
|
} |
|
|
object(Kreezalid\Page\Controller\PagesController) {
name => 'Pages'
helpers => []
request => object(Cake\Network\Request) {
params => [
[maximum depth reached]
]
data => [[maximum depth reached]]
query => [[maximum depth reached]]
cookies => [[maximum depth reached]]
url => 'uploads/ecomedia/868986.jpg'
base => ''
webroot => '/'
here => '/uploads/ecomedia/868986.jpg'
trustProxy => false
[protected] _environment => [
[maximum depth reached]
]
[protected] _detectors => [
[maximum depth reached]
]
[protected] _detectorCache => [
[maximum depth reached]
]
[protected] _input => ''
[protected] _session => object(Cake\Network\Session) {}
}
response => object(Cake\Network\Response) {
'status' => (int) 200,
'contentType' => 'text/html',
'headers' => [[maximum depth reached]],
'file' => null,
'fileRange' => [[maximum depth reached]],
'cookies' => [[maximum depth reached]],
'cacheDirectives' => [[maximum depth reached]],
'body' => ''
}
paginate => []
autoRender => true
components => []
View => null
plugin => 'Kreezalid/Page'
passedArgs => [
(int) 0 => 'uploads',
(int) 1 => 'ecomedia',
(int) 2 => '868986.jpg'
]
modelClass => 'Kreezalid/Page.Pages'
viewClass => null
viewVars => []
RequestHandler => object(Cake\Controller\Component\RequestHandlerComponent) {
'components' => [[maximum depth reached]],
'implementedEvents' => [
[maximum depth reached]
],
'_config' => [
[maximum depth reached]
]
}
Flash => object(Cake\Controller\Component\FlashComponent) {
'components' => [[maximum depth reached]],
'implementedEvents' => [[maximum depth reached]],
'_config' => [
[maximum depth reached]
]
}
Cookie => object(Cake\Controller\Component\CookieComponent) {
'components' => [[maximum depth reached]],
'implementedEvents' => [[maximum depth reached]],
'_config' => [
[maximum depth reached]
]
}
Auth => object(Cake\Controller\Component\AuthComponent) {
'components' => [
[maximum depth reached]
],
'implementedEvents' => [
[maximum depth reached]
],
'_config' => [
[maximum depth reached]
]
}
RememberMe => object(Kreezalid\Users\Controller\Component\RememberMeComponent) {
'components' => [
[maximum depth reached]
],
'implementedEvents' => [
[maximum depth reached]
],
'_config' => [[maximum depth reached]]
}
UsersAuth => object(Kreezalid\Users\Controller\Component\UsersAuthComponent) {
'components' => [[maximum depth reached]],
'implementedEvents' => [[maximum depth reached]],
'_config' => [[maximum depth reached]]
}
Pages => object(Kreezalid\Page\Model\Table\PagesTable) {
'registryAlias' => 'Kreezalid/Page.Pages',
'table' => 'cms_pages',
'alias' => 'Pages',
'entityClass' => 'Kreezalid\Page\Model\Entity\Page',
'associations' => [
[maximum depth reached]
],
'behaviors' => [
[maximum depth reached]
],
'defaultConnection' => 'default',
'connectionName' => 'default'
}
Redirections => object(Kreezalid\Page\Model\Table\RedirectionsTable) {
'registryAlias' => 'Kreezalid/Page.Redirections',
'table' => 'redirections',
'alias' => 'Redirections',
'entityClass' => 'Kreezalid\Page\Model\Entity\Redirection',
'associations' => [[maximum depth reached]],
'behaviors' => [[maximum depth reached]],
'defaultConnection' => 'default',
'connectionName' => 'default'
}
[protected] _responseClass => 'Cake\Network\Response'
[protected] _components => object(Cake\Controller\ComponentRegistry) {
'_Controller' => object(Kreezalid\Page\Controller\PagesController) {},
'_loaded' => [
[maximum depth reached]
],
'_eventManager' => object(Cake\Event\EventManager) {},
'_eventClass' => '\Cake\Event\Event'
}
[protected] _validViewOptions => [
(int) 0 => 'passedArgs'
]
[protected] _eventManager => object(Cake\Event\EventManager) {
'_listeners' => [
[maximum depth reached]
],
'_isGlobal' => false,
'_eventList' => null,
'_trackEvents' => false,
'_generalManager' => '(object) EventManager'
}
[protected] _eventClass => '\Cake\Event\Event'
[protected] _tableLocator => object(Cake\ORM\Locator\TableLocator) {
[protected] _config => [[maximum depth reached]]
[protected] _instances => [
[maximum depth reached]
]
[protected] _fallbacked => [[maximum depth reached]]
[protected] _options => [
[maximum depth reached]
]
}
[protected] _modelFactories => [
'Table' => [
(int) 0 => object(Cake\ORM\Locator\TableLocator) {},
(int) 1 => 'get'
]
]
[protected] _modelType => 'Table'
[protected] _viewBuilder => object(Cake\View\ViewBuilder) {
[protected] _templatePath => null
[protected] _template => null
[protected] _plugin => null
[protected] _theme => null
[protected] _layout => 'Kreezalid/Core.default'
[protected] _autoLayout => null
[protected] _layoutPath => null
[protected] _name => null
[protected] _className => null
[protected] _options => [[maximum depth reached]]
[protected] _helpers => [[maximum depth reached]]
}
}
$cakeRequest = RequestTransformer::toCake($request); |
|
$cakeResponse = ResponseTransformer::toCake($response); |
|
|
|
// Dispatch the request/response to CakePHP |
|
$cakeResponse = $this->getDispatcher()->dispatch($cakeRequest, $cakeResponse); |
|
|
|
// Convert the response back into a PSR7 object. |
|
return ResponseTransformer::toPsr($cakeResponse); |
|
} |
object(Cake\Network\Request) {
params => [
'pass' => [
(int) 0 => 'uploads',
(int) 1 => 'ecomedia',
(int) 2 => '868986.jpg'
],
'controller' => 'Pages',
'action' => 'loadPage',
'plugin' => 'Kreezalid/Page',
'_matchedRoute' => '/*',
'_ext' => null,
'isAjax' => false
]
data => []
query => []
cookies => []
url => 'uploads/ecomedia/868986.jpg'
base => ''
webroot => '/'
here => '/uploads/ecomedia/868986.jpg'
trustProxy => false
[protected] _environment => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904,
'HTTP_X_HTTP_METHOD_OVERRIDE' => null,
'ORIGINAL_REQUEST_METHOD' => 'GET',
'HTTPS' => false,
'HTTP_X_REQUESTED_WITH' => null,
'HTTP_IF_NONE_MATCH' => null,
'HTTP_IF_MODIFIED_SINCE' => null
]
[protected] _detectors => [
'get' => [
'env' => 'REQUEST_METHOD',
'value' => 'GET'
],
'post' => [
'env' => 'REQUEST_METHOD',
'value' => 'POST'
],
'put' => [
'env' => 'REQUEST_METHOD',
'value' => 'PUT'
],
'patch' => [
'env' => 'REQUEST_METHOD',
'value' => 'PATCH'
],
'delete' => [
'env' => 'REQUEST_METHOD',
'value' => 'DELETE'
],
'head' => [
'env' => 'REQUEST_METHOD',
'value' => 'HEAD'
],
'options' => [
'env' => 'REQUEST_METHOD',
'value' => 'OPTIONS'
],
'ssl' => [
'env' => 'HTTPS',
'options' => [
[maximum depth reached]
]
],
'ajax' => [
'env' => 'HTTP_X_REQUESTED_WITH',
'value' => 'XMLHttpRequest'
],
'flash' => [
'env' => 'HTTP_USER_AGENT',
'pattern' => '/^(Shockwave|Adobe) Flash/'
],
'requested' => [
'param' => 'requested',
'value' => (int) 1
],
'json' => [
'accept' => [
[maximum depth reached]
],
'param' => '_ext',
'value' => 'json'
],
'xml' => [
'accept' => [
[maximum depth reached]
],
'param' => '_ext',
'value' => 'xml'
],
'mobile' => object(Closure) {},
'tablet' => object(Closure) {}
]
[protected] _detectorCache => [
'post' => false,
'put' => false,
'ajax' => false,
'get' => true,
'head' => false,
'options' => false
]
[protected] _input => ''
[protected] _session => object(Cake\Network\Session) {
[protected] _engine => null
[protected] _started => null
[protected] _lifetime => '1440'
[protected] _isCLI => false
}
}
object(Cake\Network\Response) {
'status' => (int) 200,
'contentType' => 'text/html',
'headers' => [],
'file' => null,
'fileRange' => [],
'cookies' => [],
'cacheDirectives' => [],
'body' => ''
}
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {},
'params' => [
'pass' => [
[maximum depth reached]
],
'controller' => 'Pages',
'action' => 'loadPage',
'plugin' => 'Kreezalid/Page',
'_matchedRoute' => '/*'
]
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
object(Cake\Http\Runner) {
[protected] index => (int) 4
[protected] middleware => object(Cake\Http\MiddlewareQueue) {
[protected] queue => [
[maximum depth reached]
]
[protected] callables => [
[maximum depth reached]
]
}
}
$response->getHeaders() |
|
); |
|
} |
|
|
|
return $next($request, $response); |
|
} |
|
} |
|
|
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {},
'params' => [
'pass' => [
[maximum depth reached]
],
'controller' => 'Pages',
'action' => 'loadPage',
'plugin' => 'Kreezalid/Page',
'_matchedRoute' => '/*'
]
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {},
'params' => [
'pass' => [
[maximum depth reached]
],
'controller' => 'Pages',
'action' => 'loadPage',
'plugin' => 'Kreezalid/Page',
'_matchedRoute' => '/*'
]
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
object(Cake\Http\Runner) {
[protected] index => (int) 4
[protected] middleware => object(Cake\Http\MiddlewareQueue) {
[protected] queue => [
[maximum depth reached]
]
[protected] callables => [
[maximum depth reached]
]
}
}
} |
|
|
|
$assetFile = $this->_getAssetFile($url); |
|
if ($assetFile === null || !file_exists($assetFile)) { |
|
return $next($request, $response); |
|
} |
|
|
|
$file = new File($assetFile); |
|
$modifiedTime = $file->lastChange(); |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
object(Cake\Http\Runner) {
[protected] index => (int) 4
[protected] middleware => object(Cake\Http\MiddlewareQueue) {
[protected] queue => [
[maximum depth reached]
]
[protected] callables => [
[maximum depth reached]
]
}
}
*/ |
|
public function __invoke($request, $response, $next) |
|
{ |
|
try { |
|
return $next($request, $response); |
|
} catch (\Exception $e) { |
|
return $this->handleException($e, $request, $response); |
|
} |
|
} |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
object(Cake\Http\Runner) {
[protected] index => (int) 4
[protected] middleware => object(Cake\Http\MiddlewareQueue) {
[protected] queue => [
[maximum depth reached]
]
[protected] callables => [
[maximum depth reached]
]
}
}
{ |
|
$this->middleware = $middleware; |
|
$this->index = 0; |
|
|
|
return $this->__invoke($request, $response); |
|
} |
|
|
|
/** |
|
* @param \Psr\Http\Message\ServerRequestInterface $request The server request |
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
throw new RuntimeException('The application `middleware` method did not return a middleware queue.'); |
|
} |
|
$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.', |
object(Cake\Http\MiddlewareQueue) {
[protected] queue => [
(int) 0 => object(Cake\Error\Middleware\ErrorHandlerMiddleware) {},
(int) 1 => object(Cake\Routing\Middleware\AssetMiddleware) {},
(int) 2 => object(Cake\Routing\Middleware\RoutingMiddleware) {},
(int) 3 => object(App\Application) {}
]
[protected] callables => [
(int) 0 => object(Cake\Error\Middleware\ErrorHandlerMiddleware) {},
(int) 1 => object(Cake\Routing\Middleware\AssetMiddleware) {},
(int) 2 => object(Cake\Routing\Middleware\RoutingMiddleware) {},
(int) 3 => object(App\Application) {}
]
}
object(Zend\Diactoros\ServerRequest) {
[protected] headers => [
'accept' => [
(int) 0 => '*/*'
],
'host' => [
(int) 0 => 'www2.deskmanager.ch'
]
]
[protected] headerNames => [
'accept' => 'accept',
'host' => 'host'
]
[private] attributes => [
'base' => '',
'webroot' => '/',
'session' => object(Cake\Network\Session) {}
]
[private] cookieParams => []
[private] parsedBody => []
[private] queryParams => []
[private] serverParams => [
'USER' => 'kreezalid',
'HOME' => '/home/kreezalid',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/uploads/ecomedia/868986.jpg',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/uploads/ecomedia/868986.jpg',
'REMOTE_PORT' => '46954',
'SCRIPT_FILENAME' => '/home/kreezalid/customers/deskmanager/www/webroot/index.php',
'SERVER_ADMIN' => '[no address given]',
'CONTEXT_DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'CONTEXT_PREFIX' => '',
'REQUEST_SCHEME' => 'http',
'DOCUMENT_ROOT' => '/home/kreezalid/customers/deskmanager/www/webroot/',
'REMOTE_ADDR' => '51.255.43.55',
'SERVER_PORT' => '80',
'SERVER_ADDR' => '51.255.43.55',
'SERVER_NAME' => 'www2.deskmanager.ch',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_SIGNATURE' => '',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'HTTP_ACCEPT' => '*/*',
'HTTP_HOST' => 'www2.deskmanager.ch',
'proxy-nokeepalive' => '1',
'REDIRECT_STATUS' => '200',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => (float) 1480774904.103,
'REQUEST_TIME' => (int) 1480774904
]
[private] uploadedFiles => []
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\PhpInputStream) {
[protected] resource => resource
[protected] stream => 'php://input'
[private] cache => ''
[private] reachedEof => true
}
[private] method => 'GET'
[private] requestTarget => null
[private] uri => object(Zend\Diactoros\Uri) {
[protected] allowedSchemes => [
[maximum depth reached]
]
[private] scheme => 'http'
[private] userInfo => ''
[private] host => 'www2.deskmanager.ch'
[private] port => null
[private] path => '/uploads/ecomedia/868986.jpg'
[private] query => ''
[private] fragment => ''
[private] uriString => null
}
}
object(Zend\Diactoros\Response) {
[protected] headers => []
[protected] headerNames => []
[private] phrases => [
(int) 100 => 'Continue',
(int) 101 => 'Switching Protocols',
(int) 102 => 'Processing',
(int) 200 => 'OK',
(int) 201 => 'Created',
(int) 202 => 'Accepted',
(int) 203 => 'Non-Authoritative Information',
(int) 204 => 'No Content',
(int) 205 => 'Reset Content',
(int) 206 => 'Partial Content',
(int) 207 => 'Multi-status',
(int) 208 => 'Already Reported',
(int) 226 => 'IM used',
(int) 300 => 'Multiple Choices',
(int) 301 => 'Moved Permanently',
(int) 302 => 'Found',
(int) 303 => 'See Other',
(int) 304 => 'Not Modified',
(int) 305 => 'Use Proxy',
(int) 306 => 'Switch Proxy',
(int) 307 => 'Temporary Redirect',
(int) 308 => 'Permanent Redirect',
(int) 400 => 'Bad Request',
(int) 401 => 'Unauthorized',
(int) 402 => 'Payment Required',
(int) 403 => 'Forbidden',
(int) 404 => 'Not Found',
(int) 405 => 'Method Not Allowed',
(int) 406 => 'Not Acceptable',
(int) 407 => 'Proxy Authentication Required',
(int) 408 => 'Request Time-out',
(int) 409 => 'Conflict',
(int) 410 => 'Gone',
(int) 411 => 'Length Required',
(int) 412 => 'Precondition Failed',
(int) 413 => 'Request Entity Too Large',
(int) 414 => 'Request-URI Too Large',
(int) 415 => 'Unsupported Media Type',
(int) 416 => 'Requested range not satisfiable',
(int) 417 => 'Expectation Failed',
(int) 418 => 'I'm a teapot',
(int) 421 => 'Misdirected Request',
(int) 422 => 'Unprocessable Entity',
(int) 423 => 'Locked',
(int) 424 => 'Failed Dependency',
(int) 425 => 'Unordered Collection',
(int) 426 => 'Upgrade Required',
(int) 428 => 'Precondition Required',
(int) 429 => 'Too Many Requests',
(int) 431 => 'Request Header Fields Too Large',
(int) 444 => 'Connection Closed Without Response',
(int) 451 => 'Unavailable For Legal Reasons',
(int) 499 => 'Client Closed Request',
(int) 500 => 'Internal Server Error',
(int) 501 => 'Not Implemented',
(int) 502 => 'Bad Gateway',
(int) 503 => 'Service Unavailable',
(int) 504 => 'Gateway Time-out',
(int) 505 => 'HTTP Version not supported',
(int) 506 => 'Variant Also Negotiates',
(int) 507 => 'Insufficient Storage',
(int) 508 => 'Loop Detected',
(int) 510 => 'Not Extended',
(int) 511 => 'Network Authentication Required',
(int) 599 => 'Network Connect Timeout Error'
]
[private] reasonPhrase => ''
[private] statusCode => (int) 200
[private] protocol => '1.1'
[private] stream => object(Zend\Diactoros\Stream) {
[protected] resource => resource
[protected] stream => 'php://memory'
}
}
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application |
|
// and emit the response. |
|
$server->emit($server->run()); |
|
|
No arguments
If you want to customize this error message, create src/Template/Error/error400.ctp