PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #6039

setFrontendObject needed to allow objects passed

Details

Request #6039setFrontendObject needed to allow objects passed
Submitted2005-11-23 08:15 UTC
Fromcweiske at cweiske dot de
Assignedcellog
StatusClosed
PackagePEAR
PHP VersionIrrelevant
OSany
Roadmaps(Not assigned)

Comments

[2005-11-23 08:15 UTC] cweiske at cweiske dot de

Description:
------------
After noting that I need to implement some methods and set my application as the UI output driver, I'm going to set an object as PEAR_Frontend. One problem is that PEAR_Frontend only allows one to pass a class name, but not an already instantiated object - that's very bad if you already have an object you want to use, or you have to create the object via a factory or a singleton method.

So I suggest that PEAR_Frontend#setFrontendClass($uiclass) allows one to pass an object (additional to the class thing) which is set as _PEAR_FRONTEND_SINGLETON, so that one can rely on the method and doesn't have to set the global variable himself.