Source for file AutoloadDebug.php
Documentation is available at AutoloadDebug.php
* The internal __autoload() function of the shell-wrapper has two hooks.
* The first is called before the include is done, the second afterwards.
* we use it to track the order the includes are handled. That makes it
* easier to find implicit dependency problems.
* :set autoloaddebug = on
* :set autoloaddebug = off
* the depth functions track the recursive depth of the includes. The
* wrapper uses it to print the dots at the beginning of the line.
class PHP_Shell_Extensions_AutoloadDebug implements PHP_Shell_Extension {
* is the extenion enabled
protected $autoload_debug = false;
* recursive depth of the includes
protected $autoload_depth = 0;
public function register () {
$opt = PHP_Shell_Options ::getInstance ();
$opt->registerOption ('autoloaddebug', $this, 'optSetAutoloadDebug');
* handle the autoloaddebug flag
public function optSetAutoloadDebug ($key, $value) {
$this->autoload_debug = true;
$this->autoload_debug = false;
printf(":set %s failed, unknown value. Use :set %s = (on|off)", $key, $key);
* 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;
Documentation generated on Mon, 11 Mar 2019 14:40:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|