/home/javelinda/domains/cms.javelincommodities.com/public_html/kirby/src/Cms/Page.php
$result = $cache->get($cacheId);
$html = $result['html'] ?? null;
$response = $result['response'] ?? [];
// reconstruct the response configuration
if (empty($html) === false && empty($response) === false) {
$kirby->response()->fromArray($response);
}
}
// fetch the page regularly
if ($html === null) {
if ($contentType === 'html') {
$template = $this->template();
} else {
$template = $this->representation($contentType);
}
if ($template->exists() === false) {
throw new NotFoundException([
'key' => 'template.default.notFound'
]);
}
$kirby->data = $this->controller($data, $contentType);
// render the page
$html = $template->render($kirby->data);
// convert the response configuration to an array
$response = $kirby->response()->toArray();
// cache the result
if ($cache !== null && $kirby->response()->cache() === true) {
$cache->set($cacheId, [
'html' => $html,
'response' => $response
], $kirby->response()->expires() ?? 0);
}
}
/home/javelinda/domains/cms.javelincommodities.com/public_html/kirby/src/Cms/App.php
// Empty input
if (empty($input) === true) {
return $this->io(new NotFoundException());
}
// Response Configuration
if (is_a($input, 'Kirby\Cms\Responder') === true) {
return $input->send();
}
// Responses
if (is_a($input, 'Kirby\Http\Response') === true) {
return $input;
}
// Pages
if (is_a($input, 'Kirby\Cms\Page')) {
try {
$html = $input->render();
} catch (ErrorPageException $e) {
return $this->io($e);
}
if ($input->isErrorPage() === true) {
if ($response->code() === null) {
$response->code(404);
}
}
return $response->send($html);
}
// Files
if (is_a($input, 'Kirby\Cms\File')) {
return $response->redirect($input->mediaUrl(), 307)->send();
}
// Simple HTML response
if (is_string($input) === true) {
/home/javelinda/domains/cms.javelincommodities.com/public_html/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|null $path
* @param string|null $language
* @return mixed
* @throws \Kirby\Exception\NotFoundException if the home page cannot be found
/home/javelinda/domains/cms.javelincommodities.com/public_html/index.php
<?php
header('Access-Control-Allow-Origin: *');
header('HTTP/1.1 200 OK');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Methods: GET, HEAD, OPTIONS, POST, PUT');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization');
header('Content-type: application/json; charset=utf-8');
require './kirby/bootstrap.php';
echo (new Kirby)->render();