diff --git a/.gitignore b/.gitignore index ad151ad..e82f525 100644 --- a/.gitignore +++ b/.gitignore @@ -123,4 +123,5 @@ .vscode/ /results/ -/phpunit*.xml \ No newline at end of file +/phpunit*.xml +/.phpunit.*.cache diff --git a/app/Config/App.php b/app/Config/App.php index 2da765f..b91c058 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -265,5 +265,4 @@ | - http://www.w3.org/TR/CSP/ */ public $CSPEnabled = false; - } diff --git a/app/Config/Events.php b/app/Config/Events.php index cfdb537..085cc4a 100644 --- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -20,14 +20,17 @@ */ Events::on('pre_system', function () { - while (\ob_get_level() > 0) + if (ENVIRONMENT !== 'testing') { - \ob_end_flush(); - } + while (\ob_get_level() > 0) + { + \ob_end_flush(); + } - \ob_start(function ($buffer) { - return $buffer; - }); + \ob_start(function ($buffer) { + return $buffer; + }); + } /* * -------------------------------------------------------------------- diff --git a/app/Config/Kint.php b/app/Config/Kint.php new file mode 100644 index 0000000..9562447 --- /dev/null +++ b/app/Config/Kint.php @@ -0,0 +1,62 @@ + - -
-version = CodeIgniter\CodeIgniter::CI_VERSION ?>
+The page you are looking at is being generated dynamically by CodeIgniter.
+If you would like to edit this page you'll find it located at:
+
-
- app/Views/welcome_message.php
-
-
+
- The corresponding controller for this page is found at:
+ -
-
- app/Controllers/Home.php
-
-
+If you are exploring CodeIgniter for the very first time, you - should start by reading the - User Guide.
+The page you are looking at is being generated dynamically by CodeIgniter.
- +If you would like to edit this page you will find it located at:
-app/Views/welcome_message.php
-
+ The corresponding controller for this page can be found at:
+ +app/Controllers/Home.php
+
+
+
+The User Guide contains an introduction, tutorial, a number of "how to" + guides, and then reference documentation for the components that make up + the framework. Check the User Guide !
+ +CodeIgniter is a community-developed open source project, with several + venues for the community members to gather and exchange ideas. View all + the threads on CodeIgniter's forum, or chat on Slack !
+ +CodeIgniter is a community driven project and accepts contributions + of code and documentation from the community. Why not + + join us ?
+ +Method | +Route | +Handler | +||
---|---|---|---|---|
{from} | -{to} | +{method} | +{route} | +{handler} |
'; + + $firstrow = \reset($r->contents); + + foreach ($firstrow->value->contents as $field) { + $out .= ' | '.$this->renderer->escape($field->name).' | '; + } + + $out .= '
---|---|
'; + $out .= $this->renderer->escape($row->name); + $out .= ' | '; + + foreach ($row->value->contents as $field) { + $out .= 'getType())) { + $type = $this->renderer->escape($s); + + if ($field->reference) { + $ref = '&'; + $type = $ref.$type; + } + + if (null !== ($s = $field->getSize())) { + $size .= ' ('.$this->renderer->escape($s).')'; + } + } + + if ($type) { + $out .= ' title="'.$type.$size.'"'; + } + + $out .= '>'; + + switch ($field->type) { + case 'boolean': + $out .= $field->value->contents ? ''.$ref.'true' : ''.$ref.'false'; + break; + case 'integer': + case 'double': + $out .= (string) $field->value->contents; + break; + case 'null': + $out .= ''.$ref.'null'; + break; + case 'string': + if ($field->encoding) { + $val = $field->value->contents; + if (RichRenderer::$strlen_max && self::$respect_str_length && BlobObject::strlen($val) > RichRenderer::$strlen_max) { + $val = \substr($val, 0, RichRenderer::$strlen_max).'...'; + } + + $out .= $this->renderer->escape($val); + } else { + $out .= ''.$type.''; + } + break; + case 'array': + $out .= ''.$ref.'array'.$size; + break; + case 'object': + $out .= ''.$ref.$this->renderer->escape($field->classname).''.$size; + break; + case 'resource': + $out .= ''.$ref.'resource'; + break; + default: + $out .= ''.$ref.'unknown'; + break; + } + + if (\in_array('blacklist', $field->hints, true)) { + $out .= ' Blacklisted'; + } elseif (\in_array('recursion', $field->hints, true)) { + $out .= ' Recursion'; + } elseif (\in_array('depth_limit', $field->hints, true)) { + $out .= ' Depth Limit'; + } + + $out .= ' | '; + } + + $out .= '
'.$dt->setTimeZone(new DateTimeZone('UTC'))->format('Y-m-d H:i:s T').''; + } + } +} diff --git a/system/ThirdParty/Kint/Renderer/Rich/TraceFramePlugin.php b/system/ThirdParty/Kint/Renderer/Rich/TraceFramePlugin.php new file mode 100644 index 0000000..6ca19bb --- /dev/null +++ b/system/ThirdParty/Kint/Renderer/Rich/TraceFramePlugin.php @@ -0,0 +1,68 @@ +trace['file']) && !empty($o->trace['line'])) { + $header = ''.$this->renderer->ideLink($o->trace['file'], (int) $o->trace['line']).' '; + } else { + $header = 'PHP internal call '; + } + + if ($o->trace['class']) { + $header .= $this->renderer->escape($o->trace['class'].$o->trace['type']); + } + + if (\is_string($o->trace['function'])) { + $function = $this->renderer->escape($o->trace['function'].'()'); + } else { + $function = $this->renderer->escape( + $o->trace['function']->getName().'('.$o->trace['function']->getParams().')' + ); + + if (null !== ($url = $o->trace['function']->getPhpDocUrl())) { + $function = ''.$function.''; + } + } + + $header .= ''.$function.''; + + $children = $this->renderer->renderChildren($o); + $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); + + return '
'.$this->escape($rep->contents)."\n"; + } + } + + if ($rep->contents instanceof BasicObject) { + return $this->render($rep->contents); + } + } + + protected function getPlugin(array $plugins, array $hints) + { + if ($plugins = $this->matchPlugins($plugins, $hints)) { + $plugin = \end($plugins); + + if (!isset($this->plugin_objs[$plugin])) { + $this->plugin_objs[$plugin] = new $plugin($this); + } + + return $this->plugin_objs[$plugin]; + } + } + + protected static function renderJs() + { + return \file_get_contents(KINT_DIR.'/resources/compiled/shared.js').\file_get_contents(KINT_DIR.'/resources/compiled/rich.js'); + } + + protected static function renderCss() + { + if (\file_exists(KINT_DIR.'/resources/compiled/'.self::$theme)) { + return \file_get_contents(KINT_DIR.'/resources/compiled/'.self::$theme); + } + + return \file_get_contents(self::$theme); + } + + protected static function renderFolder() + { + return '