php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58160 Derived classes not showed
Submitted: 2008-04-15 15:40 UTC Modified: 2008-05-06 08:09 UTC
From: incastrix at yahoo dot it Assigned:
Status: Closed Package: inclued (PECL)
PHP Version: 5_3 CVS-2008-04-15 (dev) OS: linux debian lenny AMD64
Private report: No CVE-ID: None
 [2008-04-15 15:40 UTC] incastrix at yahoo dot it
Description:
------------
I use inclued to dump my framework hierarchy. the extension is installed correctly and work. when I run gengraph.php receive some notice:
Notice: Undefined index: mangled_name in /usr/local/src/inclued-0.1.0/gengraph.php on line 93
Notice: Undefined index: mangled_name in /usr/local/src/inclued-0.1.0/gengraph.php on line 123

then I'm able to create png file.
When I open it, I found only base classes and not derived.
Can't post code too big and atm can't reproduce with smaller code, but if you wish I can mail extension output, gengraph.php output and png file.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-16 09:41 UTC] gopalv82 at yahoo dot com
Could you post the inclued output (in the /tmp/ dir) ?

And if you can, the php code?
 [2008-04-17 17:36 UTC] incastrix at yahoo dot it
this code reproduce:

 abstract class abstractApplication {
 	private static $instance;
 	
 	protected $resourceProxy;
 	
	final public static function getInstance() {
		$calledClass = get_called_class();
		if (!isset(self::$instance)) {
			self::$instance = new $calledClass;
		}
		
		return self::$instance;
	}
	
    final protected function __construct() {
    }

	final public function getResource($resource) {
		$cacher = self::$instance;
		
		$cachedResource = $a->resourceProxy->get($resource);
		
		return($cachedResource);
	}
	
	abstract public function execute();
}

class httpApplication extends abstractApplication { 
    public function initialize() {
    } 

    public function execute() {
    }
    
    public function canDoAction($action) {
    }
    
	public function login() {
	}
}

class websiteApplication extends httpApplication { 
    public function initialize() {
    } 

    public function execute() {
    }
    
    public function canDoAction($action) {
    }
    
	public function login() {
	}
}

class otherBaseClass {
	public function doSomething() {
		
	}
}

class otherDerived extends otherBaseClass {
	public function doSomething() {
		
	}	
}

$application = httpApplication::getInstance();

echo "end";

------------------------------------------------

espect:

object->abstractApplication->httpApplication->websiteApplication
|
+->otherBaseClass->otherDerived
 [2008-05-06 08:09 UTC] gopalv82 at yahoo dot com
Fixed 

http://news.php.net/php.pecl.cvs/10703

If you have any ideas on improving the visual aspects of the dump, please feel free to muck around with the gengraph.php output and send me a patch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC