From 6dae236ec5528522de472637f9d70a98158b9a5d Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 5 Feb 2015 11:45:26 +0100 Subject: Renamed 3rdparty directory to vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Php namespaces can’t begin with a number --- .../PHP/Shell/Extensions/AutoloadDebug.php | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 framework/Vendor/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php (limited to 'framework/Vendor/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php') diff --git a/framework/Vendor/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php b/framework/Vendor/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php new file mode 100644 index 00000000..3926ff9e --- /dev/null +++ b/framework/Vendor/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php @@ -0,0 +1,84 @@ +registerOption('autoloaddebug', $this, 'optSetAutoloadDebug'); + } + + /** + * handle the autoloaddebug flag + * + * @param string + */ + public function optSetAutoloadDebug($key, $value) { + switch ($value) { + case "enable": + case "1": + case "on": + $this->autoload_debug = true; + break; + case "disable": + case "0": + case "off": + $this->autoload_debug = false; + break; + default: + printf(":set %s failed, unknown value. Use :set %s = (on|off)", $key, $key); + return; + } + + } + + /** + * is the autoload-debug flag set ? + * + * @return bool true if debug is enabled + */ + public function isAutoloadDebug() { + return $this->autoload_debug; + } + + /** + * increment the depth counter + */ + public function incAutoloadDepth() { + return $this->autoload_depth++; + } + + /** + * decrement the depth counter + */ + public function decAutoloadDepth() { + return --$this->autoload_depth; + } +} + -- cgit v1.2.3