From 1e5f13b21b33b0d7ce86fe97ca145a3561433a7a Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 18 Sep 2006 22:57:16 +0000 Subject: Add an interactive php shell that loads Prado classes. --- .../PHP/Shell/Extensions/AutoloadDebug.php | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 framework/3rdParty/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php (limited to 'framework/3rdParty/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php') diff --git a/framework/3rdParty/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php b/framework/3rdParty/PhpShell/PHP/Shell/Extensions/AutoloadDebug.php new file mode 100644 index 00000000..3926ff9e --- /dev/null +++ b/framework/3rdParty/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