/kunden
/399706_17349
/bauernhof-thamm.de
/site
/plugins
/cookie-handling
/index.php
],
[
'pattern' => 'cookies/true',
'action' => function () {
Cookie::set('thirdPartyCookies', '2', ['lifetime' => (time() + (21*24*60*60)), 'path' => '/']);
go($_SERVER['HTTP_REFERER'], 200);
}
],
[
'pattern' => 'ajaxcookie/false',
'action' => function () {
Cookie::set('thirdPartyCookies', '1', ['lifetime' => (time() + (1*24*60*60)), 'path' => '/']);
return json_encode(['redirect' => false]);
}
],
[
'pattern' => 'cookies/false',
'action' => function () {
Cookie::set('thirdPartyCookies', '1', ['lifetime' => (time() + (1*24*60*60)), 'path' => '/']);
go($_SERVER['HTTP_REFERER'], 200);
}
]
]
]);
/kunden
/399706_17349
/bauernhof-thamm.de
/site
/plugins
/cookie-handling
/index.php
],
[
'pattern' => 'cookies/true',
'action' => function () {
Cookie::set('thirdPartyCookies', '2', ['lifetime' => (time() + (21*24*60*60)), 'path' => '/']);
go($_SERVER['HTTP_REFERER'], 200);
}
],
[
'pattern' => 'ajaxcookie/false',
'action' => function () {
Cookie::set('thirdPartyCookies', '1', ['lifetime' => (time() + (1*24*60*60)), 'path' => '/']);
return json_encode(['redirect' => false]);
}
],
[
'pattern' => 'cookies/false',
'action' => function () {
Cookie::set('thirdPartyCookies', '1', ['lifetime' => (time() + (1*24*60*60)), 'path' => '/']);
go($_SERVER['HTTP_REFERER'], 200);
}
]
]
]);
/kunden
/399706_17349
/bauernhof-thamm.de
/kirby
/src
/Http
/Router.php
*/
public function call(string $path = null, string $method = 'GET', Closure $callback = null)
{
$path = $path ?? '';
$ignore = [];
$result = null;
$loop = true;
while ($loop === true) {
$route = $this->find($path, $method, $ignore);
if (is_a(static::$beforeEach, 'Closure') === true) {
(static::$beforeEach)($route, $path, $method);
}
try {
if ($callback) {
$result = $callback($route);
} else {
$result = $route->action()->call($route, ...$route->arguments());
}
$loop = false;
} catch (Exceptions\NextRouteException $e) {
$ignore[] = $route;
}
if (is_a(static::$afterEach, 'Closure') === true) {
$result = (static::$afterEach)($route, $path, $method, $result);
}
}
return $result;
}
/**
* Finds a Route object by path and method
* The Route's arguments method is used to
* find matches and return all the found
* arguments in the path.
/kunden
/399706_17349
/bauernhof-thamm.de
/kirby
/src
/Cms
/App.php
/**
* Calls any Kirby route
*
* @param string $path
* @param string $method
* @return mixed
*/
public function call(string $path = null, string $method = null)
{
$router = $this->router();
$router::$beforeEach = function ($route, $path, $method) {
$this->trigger('route:before', $route, $path, $method);
};
$router::$afterEach = function ($route, $path, $method, $result) {
return $this->apply('route:after', $route, $path, $method, $result);
};
return $router->call($path ?? $this->path(), $method ?? $this->request()->method());
}
/**
* Returns a specific user-defined collection
* by name. All relevant dependencies are
* automatically injected
*
* @param string $name
* @return \Kirby\Cms\Collection|null
*/
public function collection(string $name)
{
return $this->collections()->get($name, [
'kirby' => $this,
'site' => $this->site(),
'pages' => $this->site()->children(),
'users' => $this->users()
]);
}
/kunden
/399706_17349
/bauernhof-thamm.de
/kirby
/src
/Cms
/App.php
$scriptName = $_SERVER['SCRIPT_NAME'];
$scriptFile = basename($scriptName);
$scriptDir = dirname($scriptName);
$scriptPath = $scriptFile === 'index.php' ? $scriptDir : $scriptName;
$requestPath = preg_replace('!^' . preg_quote($scriptPath) . '!', '', $requestUri);
return $this->setPath($requestPath)->path;
}
/**
* Returns the Response object for the
* current request
*
* @param string|null $path
* @param string|null $method
* @return \Kirby\Http\Response
*/
public function render(string $path = null, string $method = null)
{
return $this->io($this->call($path, $method));
}
/**
* Returns the Request singleton
*
* @return \Kirby\Http\Request
*/
public function request()
{
return $this->request = $this->request ?? new Request();
}
/**
* Path resolver for the router
*
* @internal
* @param string $path
* @param string|null $language
* @return mixed
*/
/kunden
/399706_17349
/bauernhof-thamm.de
/index.php
<?php
require __DIR__ . '/kirby/bootstrap.php';
echo (new Kirby)->render();