Re: Re: XML_CSSML, XML_XPath
| From: | bertrand Gugger | Date: | Mon, 10 Oct 2005 09:22:57 +0000 |
| Subject: | Re: Re: XML_CSSML, XML_XPath | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-3111@lists.php.net to get a copy of this message | ||
Bonjour,
Arnaud Limbourg wrote:
To be clearer it boils down to two choices: - add a dependency on PHP4, so it cannot be installed under PHP5 - add a warning telling people to update their script to use the factory method and remove the $this reassignment trick I still believe it's possible to correct this bug for any PHPThe trick could be done by adding a private property: $_theObj = null; if the constructor is called instead of the factory do:
$this->_theObj = $this->factory($in_driver, $in_CSSML, $in_type, $in_params);then correct all the methods in CSSML.php as: function load() {
if ($this->_theObj) {
return $this->_theObj->load();
}
if ($this->loaded) {
return PEAR::raiseError(null, XML_CSSML_ALREADY_EXISTS, null, E_USER_WARNING, $this->CSSMLDoc, 'XML_CSSML_Error', true);
}
}
etc...
my 2cts
à+
--
bertrand "toggg" Gugger