/home/users/2/pupu.jp-kokoyo/web/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
* Writes a string content to file in an atomic way.
*
* @param string $filename Path to the file where to write the data.
* @param string $content The content to write
*
* @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error.
*/
protected function writeFile(string $filename, string $content): bool
{
$filepath = pathinfo($filename, PATHINFO_DIRNAME);
if (! $this->createPathIfNeeded($filepath)) {
return false;
}
if (! is_writable($filepath)) {
return false;
}
$tmpFile = tempnam($filepath, 'swap');
@chmod($tmpFile, 0666 & (~$this->umask));
if (file_put_contents($tmpFile, $content) !== false) {
@chmod($tmpFile, 0666 & (~$this->umask));
if (@rename($tmpFile, $filename)) {
return true;
}
@unlink($tmpFile);
}
return false;
}
/**
* @return Iterator<string, SplFileInfo>
*/
private function getIterator(): Iterator
{
return new RecursiveIteratorIterator(
Arguments
"tempnam(): file created in the system's temporary directory"
/home/users/2/pupu.jp-kokoyo/web/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
* Writes a string content to file in an atomic way.
*
* @param string $filename Path to the file where to write the data.
* @param string $content The content to write
*
* @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error.
*/
protected function writeFile(string $filename, string $content): bool
{
$filepath = pathinfo($filename, PATHINFO_DIRNAME);
if (! $this->createPathIfNeeded($filepath)) {
return false;
}
if (! is_writable($filepath)) {
return false;
}
$tmpFile = tempnam($filepath, 'swap');
@chmod($tmpFile, 0666 & (~$this->umask));
if (file_put_contents($tmpFile, $content) !== false) {
@chmod($tmpFile, 0666 & (~$this->umask));
if (@rename($tmpFile, $filename)) {
return true;
}
@unlink($tmpFile);
}
return false;
}
/**
* @return Iterator<string, SplFileInfo>
*/
private function getIterator(): Iterator
{
return new RecursiveIteratorIterator(
Arguments
"/home/users/2/pupu.jp-kokoyo/web/grav/cache/doctrine/f5fd0d24/49"
"swap"
/home/users/2/pupu.jp-kokoyo/web/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
}
fclose($resource);
return $lifetime === 0 || $lifetime > time();
}
/**
* {@inheritdoc}
*/
protected function doSave($id, $data, $lifeTime = 0)
{
if ($lifeTime > 0) {
$lifeTime = time() + $lifeTime;
}
$data = serialize($data);
$filename = $this->getFilename($id);
return $this->writeFile($filename, $lifeTime . PHP_EOL . $data);
}
}
Arguments
"/home/users/2/pupu.jp-kokoyo/web/grav/cache/doctrine/f5fd0d24/49/672d66356664306432345b30656537366464343934333163636232613133373136303662376431366230325d5b315d.doctrinecache.data"
"""
1714062971\n
O:22:"Grav\Common\Page\Media":10:{s:16:"\x00*\x00standard_exif";a:4:{i:0;s:8:"FileSize";i:1;s:8:"MimeType";i:2;s:6:"height";i:3;s:5:"width";}s:8:"\x00*\x00items";a:5:{s:6:"00.png";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-png.png";s:4:"mime";s:9:"image/png";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:85:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/00.png";s:8:"filename";s:6:"00.png";s:8:"basename";s:2:"00";s:9:"extension";s:3:"png";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-png.png";s:5:"media";s:85:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/00.png";}s:4:"size";i:47387;s:5:"debug";b:0;s:5:"width";i:983;s:6:"height";i:750;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-29-42.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-29-42.jpg";s:8:"filename";s:22:"2016-07-0412-29-42.jpg";s:8:"basename";s:18:"2016-07-0412-29-42";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839947;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-29-42.jpg";}s:4:"size";i:176631;s:5:"debug";b:0;s:5:"width";i:982;s:6:"height";i:632;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-30-36.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-30-36.jpg";s:8:"filename";s:22:"2016-07-0412-30-36.jpg";s:8:"basename";s:18:"2016-07-0412-30-36";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-30-36.jpg";}s:4:"size";i:47709;s:5:"debug";b:0;s:5:"width";i:894;s:6:"height";i:402;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-48-56.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-48-56.jpg";s:8:"filename";s:22:"2016-07-0412-48-56.jpg";s:8:"basename";s:18:"2016-07-0412-48-56";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-48-56.jpg";}s:4:"size";i:40561;s:5:"debug";b:0;s:5:"width";i:389;s:6:"height";i:786;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-49-16.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-49-16.jpg";s:8:"filename";s:22:"2016-07-0412-49-16.jpg";s:8:"basename";s:18:"2016-07-0412-49-16";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-49-16.jpg";}s:4:"size";i:37942;s:5:"debug";b:0;s:5:"width";i:384;s:6:"height";i:791;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}}s:7:"\x00*\x00path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:9:"\x00*\x00images";a:5:{s:6:"00.png";r:8;s:22:"2016-07-0412-29-42.jpg";r:61;s:22:"2016-07-0412-30-36.jpg";r:114;s:22:"2016-07-0412-48-56.jpg";r:167;s:22:"2016-07-0412-49-16.jpg";r:220;}s:9:"\x00*\x00videos";a:0:{}s:9:"\x00*\x00audios";a:0:{}s:8:"\x00*\x00files";a:0:{}s:14:"\x00*\x00media_order";a:0:{}s:52:"\x00Grav\Common\Page\Medium\AbstractMedia\x00iteratorUnset";b:0;s:55:"\x00Grav\Common\Page\Medium\AbstractMedia\x00_upload_defaults";a:7:{s:4:"self";b:1;s:17:"avoid_overwriting";b:0;s:11:"random_name";b:0;s:6:"accept";a:1:{i:0;s:7:"image/*";}s:5:"limit";i:10;s:8:"filesize";N;s:11:"destination";N;}}
"""
/home/users/2/pupu.jp-kokoyo/web/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
$namespacedKeysAndValues[$this->getNamespacedId($key)] = $value;
}
return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime);
}
/**
* {@inheritdoc}
*/
public function contains($id)
{
return $this->doContains($this->getNamespacedId($id));
}
/**
* {@inheritdoc}
*/
public function save($id, $data, $lifeTime = 0)
{
return $this->doSave($this->getNamespacedId($id), $data, $lifeTime);
}
/**
* {@inheritdoc}
*/
public function deleteMultiple(array $keys)
{
return $this->doDeleteMultiple(array_map([$this, 'getNamespacedId'], $keys));
}
/**
* {@inheritdoc}
*/
public function delete($id)
{
return $this->doDelete($this->getNamespacedId($id));
}
/**
* {@inheritdoc}
Arguments
"g-f5fd0d24[0ee76dd49431ccb2a1371606b7d16b02][1]"
"O:22:"Grav\Common\Page\Media":10:{s:16:"\x00*\x00standard_exif";a:4:{i:0;s:8:"FileSize";i:1;s:8:"MimeType";i:2;s:6:"height";i:3;s:5:"width";}s:8:"\x00*\x00items";a:5:{s:6:"00.png";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-png.png";s:4:"mime";s:9:"image/png";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:85:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/00.png";s:8:"filename";s:6:"00.png";s:8:"basename";s:2:"00";s:9:"extension";s:3:"png";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-png.png";s:5:"media";s:85:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/00.png";}s:4:"size";i:47387;s:5:"debug";b:0;s:5:"width";i:983;s:6:"height";i:750;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-29-42.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-29-42.jpg";s:8:"filename";s:22:"2016-07-0412-29-42.jpg";s:8:"basename";s:18:"2016-07-0412-29-42";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839947;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-29-42.jpg";}s:4:"size";i:176631;s:5:"debug";b:0;s:5:"width";i:982;s:6:"height";i:632;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-30-36.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-30-36.jpg";s:8:"filename";s:22:"2016-07-0412-30-36.jpg";s:8:"basename";s:18:"2016-07-0412-30-36";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-30-36.jpg";}s:4:"size";i:47709;s:5:"debug";b:0;s:5:"width";i:894;s:6:"height";i:402;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-48-56.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-48-56.jpg";s:8:"filename";s:22:"2016-07-0412-48-56.jpg";s:8:"basename";s:18:"2016-07-0412-48-56";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-48-56.jpg";}s:4:"size";i:40561;s:5:"debug";b:0;s:5:"width";i:389;s:6:"height";i:786;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}s:22:"2016-07-0412-49-16.jpg";O:35:"Grav\Common\Page\Medium\ImageMedium":29:{s:53:"\x00Grav\Common\Page\Medium\ImageMedium\x00saved_image_path";N;s:18:"\x00*\x00gettersVariable";s:5:"items";s:8:"\x00*\x00items";a:15:{s:4:"type";s:5:"image";s:5:"thumb";s:19:"media/thumb-jpg.png";s:4:"mime";s:10:"image/jpeg";s:5:"image";a:1:{s:7:"filters";a:1:{s:7:"default";a:1:{i:0;s:17:"enableProgressive";}}}s:8:"filepath";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-49-16.jpg";s:8:"filename";s:22:"2016-07-0412-49-16.jpg";s:8:"basename";s:18:"2016-07-0412-49-16";s:9:"extension";s:3:"jpg";s:4:"path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:8:"modified";i:1503839948;s:10:"thumbnails";a:2:{s:7:"default";s:71:"/home/users/2/pupu.jp-kokoyo/web/grav/system/images/media/thumb-jpg.png";s:5:"media";s:101:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail/2016-07-0412-49-16.jpg";}s:4:"size";i:37942;s:5:"debug";b:0;s:5:"width";i:384;s:6:"height";i:791;}s:13:"\x00*\x00blueprints";N;s:10:"\x00*\x00storage";N;s:42:"\x00Grav\Common\Data\Data\x00missingValuesAsNull";b:0;s:38:"\x00Grav\Common\Data\Data\x00keepEmptyValues";b:1;s:18:"\x00*\x00nestedSeparator";s:1:".";s:7:"\x00*\x00mode";s:6:"source";s:13:"\x00*\x00_thumbnail";N;s:17:"\x00*\x00thumbnailTypes";a:3:{i:0;s:4:"page";i:1;s:5:"media";i:2;s:7:"default";}s:16:"\x00*\x00thumbnailType";N;s:15:"\x00*\x00alternatives";a:0:{}s:13:"\x00*\x00attributes";a:0:{}s:18:"\x00*\x00styleAttributes";a:0:{}s:11:"\x00*\x00metadata";a:0:{}s:21:"\x00*\x00medium_querystring";a:0:{}s:12:"\x00*\x00timestamp";N;s:12:"\x00*\x00parsedown";N;s:8:"\x00*\x00image";N;s:9:"\x00*\x00format";s:5:"guess";s:10:"\x00*\x00quality";i:85;s:18:"\x00*\x00default_quality";i:85;s:20:"\x00*\x00debug_watermarked";b:0;s:13:"\x00*\x00auto_sizes";b:0;s:15:"\x00*\x00aspect_ratio";b:0;s:15:"\x00*\x00retina_scale";s:1:"1";s:12:"\x00*\x00watermark";N;s:8:"\x00*\x00sizes";s:5:"100vw";}}s:7:"\x00*\x00path";s:78:"/home/users/2/pupu.jp-kokoyo/web/grav/user/pages/02.blog/201607-markdown-gmail";s:9:"\x00*\x00images";a:5:{s:6:"00.png";r:8;s:22:"2016-07-0412-29-42.jpg";r:61;s:22:"2016-07-0412-30-36.jpg";r:114;s:22:"2016-07-0412-48-56.jpg";r:167;s:22:"2016-07-0412-49-16.jpg";r:220;}s:9:"\x00*\x00videos";a:0:{}s:9:"\x00*\x00audios";a:0:{}s:8:"\x00*\x00files";a:0:{}s:14:"\x00*\x00media_order";a:0:{}s:52:"\x00Grav\Common\Page\Medium\AbstractMedia\x00iteratorUnset";b:0;s:55:"\x00Grav\Common\Page\Medium\AbstractMedia\x00_upload_defaults";a:7:{s:4:"self";b:1;s:17:"avoid_overwriting";b:0;s:11:"random_name";b:0;s:6:"accept";a:1:{i:0;s:7:"image/*";}s:5:"limit";i:10;s:8:"filesize";N;s:11:"destination";N;}}"
1714062971
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/Cache/Adapter/DoctrineCache.php
$this->driver = $doctrineCache;
}
/**
* @inheritdoc
*/
public function doGet($key, $miss)
{
$value = $this->driver->fetch($key);
// Doctrine cache does not differentiate between no result and cached 'false'. Make sure that we do.
return $value !== false || $this->driver->contains($key) ? $value : $miss;
}
/**
* @inheritdoc
*/
public function doSet($key, $value, $ttl)
{
return $this->driver->save($key, $value, (int) $ttl);
}
/**
* @inheritdoc
*/
public function doDelete($key)
{
return $this->driver->delete($key);
}
/**
* @inheritdoc
*/
public function doClear()
{
return $this->driver->deleteAll();
}
/**
* @inheritdoc
Arguments
"0ee76dd49431ccb2a1371606b7d16b02"
Grav\Common\Page\Media {#570}
604800
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/Cache/CacheTrait.php
$value = $this->doGet($key, $this->miss);
return $value !== $this->miss ? $value : $default;
}
/**
* @param string $key
* @param mixed $value
* @param null|int|DateInterval $ttl
* @return bool
* @throws InvalidArgumentException
*/
public function set($key, $value, $ttl = null)
{
$this->validateKey($key);
$ttl = $this->convertTtl($ttl);
// If a negative or zero TTL is provided, the item MUST be deleted from the cache.
return null !== $ttl && $ttl <= 0 ? $this->doDelete($key) : $this->doSet($key, $value, $ttl);
}
/**
* @param string $key
* @return bool
* @throws InvalidArgumentException
*/
public function delete($key)
{
$this->validateKey($key);
return $this->doDelete($key);
}
/**
* @return bool
*/
public function clear()
{
return $this->doClear();
Arguments
"0ee76dd49431ccb2a1371606b7d16b02"
Grav\Common\Page\Media {#570}
604800
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Media/Traits/MediaTrait.php
return null;
}
/**
* Gets the associated media collection.
*
* @return MediaCollectionInterface|Media Representation of associated media.
*/
public function getMedia()
{
$media = $this->media;
if (null === $media) {
$cache = $this->getMediaCache();
$cacheKey = md5('media' . $this->getCacheKey());
// Use cached media if possible.
$media = $cache->get($cacheKey);
if (!$media instanceof MediaCollectionInterface) {
$media = new Media($this->getMediaFolder(), $this->getMediaOrder(), $this->_loadMedia);
$cache->set($cacheKey, $media);
}
$this->media = $media;
}
return $media;
}
/**
* Sets the associated media collection.
*
* @param MediaCollectionInterface|Media $media Representation of associated media.
* @return $this
*/
protected function setMedia(MediaCollectionInterface $media)
{
$cache = $this->getMediaCache();
$cacheKey = md5('media' . $this->getCacheKey());
$cache->set($cacheKey, $media);
Arguments
"0ee76dd49431ccb2a1371606b7d16b02"
Grav\Common\Page\Media {#570}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Page/Page.php
*/
public function getCacheKey(): string
{
return $this->id();
}
/**
* Gets and sets the associated media as found in the page folder.
*
* @param Media|null $var Representation of associated media.
* @return Media Representation of associated media.
*/
public function media($var = null)
{
if ($var) {
$this->setMedia($var);
}
/** @var Media $media */
$media = $this->getMedia();
return $media;
}
/**
* Get filesystem path to the associated media.
*
* @return string|null
*/
public function getMediaFolder()
{
return $this->path();
}
/**
* Get display order for the associated media.
*
* @return array Empty array means default ordering.
*/
public function getMediaOrder()
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Twig/Twig.php
public function processSite($format = null, array $vars = [])
{
try {
$grav = $this->grav;
// set the page now its been processed
$grav->fireEvent('onTwigSiteVariables');
/** @var Pages $pages */
$pages = $grav['pages'];
/** @var PageInterface $page */
$page = $grav['page'];
$twig_vars = $this->twig_vars;
$twig_vars['theme'] = $grav['config']->get('theme');
$twig_vars['pages'] = $pages->root();
$twig_vars['page'] = $page;
$twig_vars['header'] = $page->header();
$twig_vars['media'] = $page->media();
$twig_vars['content'] = $page->content();
// determine if params are set, if so disable twig cache
$params = $grav['uri']->params(null, true);
if (!empty($params)) {
$this->twig->setCache(false);
}
// Get Twig template layout
$template = $this->getPageTwigTemplate($page, $format);
$page->templateFormat($format);
$output = $this->twig->render($template, $vars + $twig_vars);
} catch (LoaderError $e) {
throw new RuntimeException($e->getMessage(), 400, $e);
} catch (RuntimeError $e) {
$prev = $e->getPrevious();
if ($prev instanceof TwigException) {
$code = $prev->getCode() ?: 500;
// Fire onPageNotFound event.
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Service/OutputServiceProvider.php
/**
* Class OutputServiceProvider
* @package Grav\Common\Service
*/
class OutputServiceProvider implements ServiceProviderInterface
{
/**
* @param Container $container
* @return void
*/
public function register(Container $container)
{
$container['output'] = function ($c) {
/** @var Twig $twig */
$twig = $c['twig'];
/** @var PageInterface $page */
$page = $c['page'];
return $twig->processSite($page->templateFormat());
};
}
}
Arguments
/home/users/2/pupu.jp-kokoyo/web/grav/vendor/pimple/pimple/src/Pimple/Container.php
{
if (!isset($this->keys[$id])) {
throw new UnknownIdentifierException($id);
}
if (
isset($this->raw[$id])
|| !\is_object($this->values[$id])
|| isset($this->protected[$this->values[$id]])
|| !\method_exists($this->values[$id], '__invoke')
) {
return $this->values[$id];
}
if (isset($this->factories[$this->values[$id]])) {
return $this->values[$id]($this);
}
$raw = $this->values[$id];
$val = $this->values[$id] = $raw($this);
$this->raw[$id] = $raw;
$this->frozen[$id] = true;
return $val;
}
/**
* Checks if a parameter or an object is set.
*
* @param string $id The unique identifier for the parameter or object
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($id)
{
return isset($this->keys[$id]);
}
Arguments
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/RenderProcessor.php
* @package Grav\Common\Processors
*/
class RenderProcessor extends ProcessorBase
{
/** @var string */
public $id = 'render';
/** @var string */
public $title = 'Render';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$container = $this->container;
$output = $container['output'];
if ($output instanceof ResponseInterface) {
return $output;
}
/** @var PageInterface $page */
$page = $this->container['page'];
// Use internal Grav output.
$container->output = $output;
ob_start();
$event = new Event(['page' => $page, 'output' => &$container->output]);
$container->fireEvent('onOutputGenerated', $event);
echo $container->output;
$html = ob_get_clean();
Arguments
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#545}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php
*/
class DebuggerAssetsProcessor extends ProcessorBase
{
/** @var string */
public $id = 'debugger_assets';
/** @var string */
public $title = 'Debugger Assets';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['debugger']->addAssets();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#539}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/PagesProcessor.php
/** @var Forms $forms */
$forms = $this->container['forms'] ?? null;
$form = $forms ? $forms->getActiveForm() : null;
$options = ['page' => $page, 'form' => $form, 'request' => $request];
if ($task) {
$event = new Event(['task' => $task] + $options);
$this->container->fireEvent('onPageTask', $event);
$this->container->fireEvent('onPageTask.' . $task, $event);
} elseif ($action) {
$event = new Event(['action' => $action] + $options);
$this->container->fireEvent('onPageAction', $event);
$this->container->fireEvent('onPageAction.' . $action, $event);
}
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#355}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/TwigProcessor.php
*/
class TwigProcessor extends ProcessorBase
{
/** @var string */
public $id = 'twig';
/** @var string */
public $title = 'Twig';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['twig']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#311}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/AssetsProcessor.php
class AssetsProcessor extends ProcessorBase
{
/** @var string */
public $id = '_assets';
/** @var string */
public $title = 'Assets';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['assets']->init();
$this->container->fireEvent('onAssetsInitialized');
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#305}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/SchedulerProcessor.php
class SchedulerProcessor extends ProcessorBase
{
/** @var string */
public $id = '_scheduler';
/** @var string */
public $title = 'Scheduler';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$scheduler = $this->container['scheduler'];
$this->container->fireEvent('onSchedulerInitialized', new Event(['scheduler' => $scheduler]));
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#272}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/BackupsProcessor.php
class BackupsProcessor extends ProcessorBase
{
/** @var string */
public $id = '_backups';
/** @var string */
public $title = 'Backups';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$backups = $this->container['backups'];
$backups->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#269}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/TasksProcessor.php
$response = $handler->handle($request);
}
$this->stopTimer();
return $response;
} catch (NotFoundException $e) {
// Task not found: Let it pass through.
}
}
if ($task) {
$this->container->fireEvent('onTask.' . $task);
} elseif ($action) {
$this->container->fireEvent('onAction.' . $action);
}
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#261}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/RequestProcessor.php
$uri = $request->getUri();
$ext = mb_strtolower(Utils::pathinfo($uri->getPath(), PATHINFO_EXTENSION));
$request = $request
->withAttribute('grav', $this->container)
->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
->withAttribute('route', Uri::getCurrentRoute()->withExtension($ext))
->withAttribute('referrer', $this->container['uri']->referrer());
$event = new RequestHandlerEvent(['request' => $request, 'handler' => $handler]);
/** @var RequestHandlerEvent $event */
$event = $this->container->fireEvent('onRequestHandlerInit', $event);
$response = $event->getResponse();
$this->stopTimer();
if ($response) {
return $response;
}
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#217}
Grav\Framework\RequestHandler\RequestHandler {#214}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/ThemesProcessor.php
*/
class ThemesProcessor extends ProcessorBase
{
/** @var string */
public $id = 'themes';
/** @var string */
public $title = 'Themes';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['themes']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
Grav\Framework\RequestHandler\RequestHandler {#200}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/PluginsProcessor.php
class PluginsProcessor extends ProcessorBase
{
/** @var string */
public $id = 'plugins';
/** @var string */
public $title = 'Initialize Plugins';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$grav = $this->container;
$grav->fireEvent('onPluginsInitialized');
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
Grav\Framework\RequestHandler\RequestHandler {#153}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/InitializeProcessor.php
// Initialize URI (uses session, see issue #3269).
$this->initializeUri($config);
// Grav may return redirect response right away.
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
if ($redirectCode) {
$response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
if ($response) {
$this->stopTimer('_init');
return $response;
}
}
$this->stopTimer('_init');
// Wrap call to next handler so that debugger can profile it.
/** @var Response $response */
$response = $debugger->profile(static function () use ($handler, $request) {
return $handler->handle($request);
});
// Log both request and response and return the response.
return $debugger->logRequest($request, $response);
}
public function processCli(): void
{
// Load configuration.
$config = $this->initializeConfig();
// Initialize logger.
$this->initializeLogger($config);
// Disable debugger.
$this->container['debugger']->enabled(false);
// Set timezone, locale.
$this->initializeLocale($config);
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Debugger.php
}
$this->addMeasures();
$this->addDeprecations();
$this->timers = [];
return $this->debugbar->getData();
}
/**
* Hierarchical Profiler support.
*
* @param callable $callable
* @param string|null $message
* @return mixed
*/
public function profile(callable $callable, string $message = null)
{
$this->startProfiling();
$response = $callable();
$this->stopProfiling($message);
return $response;
}
public function addTwigProfiler(Environment $twig): void
{
$clockwork = $this->getClockwork();
if ($clockwork) {
$source = new TwigClockworkDataSource($twig);
$source->listenToEvents();
$clockwork->addDataSource($source);
}
}
/**
* Start profiling code.
*
* @return void
*/
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Processors/InitializeProcessor.php
$this->initializeUri($config);
// Grav may return redirect response right away.
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
if ($redirectCode) {
$response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
if ($response) {
$this->stopTimer('_init');
return $response;
}
}
$this->stopTimer('_init');
// Wrap call to next handler so that debugger can profile it.
/** @var Response $response */
$response = $debugger->profile(static function () use ($handler, $request) {
return $handler->handle($request);
});
// Log both request and response and return the response.
return $debugger->logRequest($request, $response);
}
public function processCli(): void
{
// Load configuration.
$config = $this->initializeConfig();
// Initialize logger.
$this->initializeLogger($config);
// Disable debugger.
$this->container['debugger']->enabled(false);
// Set timezone, locale.
$this->initializeLocale($config);
// Load plugins.
Arguments
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
Grav\Framework\RequestHandler\RequestHandler {#89}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php
use function in_array;
use function is_array;
use function strlen;
/**
* Multipart request support for PUT and PATCH.
*/
class MultipartRequestSupport implements MiddlewareInterface
{
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$contentType = $request->getHeaderLine('content-type');
$method = $request->getMethod();
if (!str_starts_with($contentType, 'multipart/form-data') || !in_array($method, ['PUT', 'PATH'], true)) {
return $handler->handle($request);
}
$boundary = explode('; boundary=', $contentType, 2)[1] ?? '';
$parts = explode("--{$boundary}", $request->getBody()->getContents());
$parts = array_slice($parts, 1, count($parts) - 2);
$params = [];
$files = [];
foreach ($parts as $part) {
$this->processPart($params, $files, $part);
}
return $handler->handle($request->withParsedBody($params)->withUploadedFiles($files));
}
/**
* @param array $params
* @param array $files
* @param string $part
* @return void
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
Grav\Framework\RequestHandler\RequestHandler {#87}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/system/src/Grav/Common/Grav.php
},
'pagesProcessor' => function () {
return new PagesProcessor($this);
},
'debuggerAssetsProcessor' => function () {
return new DebuggerAssetsProcessor($this);
},
'renderProcessor' => function () {
return new RenderProcessor($this);
},
]
);
$default = static function () {
return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
};
$collection = new RequestHandler($this->middleware, $default, $container);
$response = $collection->handle($this['request']);
$body = $response->getBody();
/** @var Messages $messages */
$messages = $this['messages'];
// Prevent caching if session messages were displayed in the page.
$noCache = $messages->isCleared();
if ($noCache) {
$response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
}
// Handle ETag and If-None-Match headers.
if ($response->getHeaderLine('ETag') === '1') {
$etag = md5($body);
$response = $response->withHeader('ETag', '"' . $etag . '"');
$search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
if ($noCache === false && $search === $etag) {
$response = $response->withStatus(304);
$body = '';
Arguments
Nyholm\Psr7\ServerRequest {#63}
/home/users/2/pupu.jp-kokoyo/web/grav/index.php
// Register the auto-loader.
$loader = require $autoload;
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
// Get the Grav instance
$grav = Grav::instance(array('loader' => $loader));
// Process the page
try {
$grav->process();
} catch (\Error|\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}