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; } }