PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject_FormBuilder » Bug #4625

Make _date2array & _array2date class functions

Details

Request #4625Make _date2array & _array2date class functions
Submitted2005-06-18 14:46 UTC
Fromtim at lomointernet dot com
Assignedjustinpatrin
StatusBogus
PackageDB_DataObject_FormBuilder
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2005-06-18 14:46 UTC] tim at lomointernet dot com

Description:
------------
I needed to extend the _date2array and _array2date functions of the FormBuilder class.

At first I wanted to make a custom subclass of FormBuilder and extend the functions in it, but this was problematic I need the QuickForm subclass as well.

Then I implemented two functions outside the FormBuilder class hierarchy which called the native _date2array and _array2date statically. This was problematic as well because the native functions are instance functions (they call $this->debug(...)).

The solution is I think to make the native _date2array and _array2date function class functions, which do not rely on an instance. That would enable me to use them without having an instance of FormBuilder available, without hacking a nasty work-around.
Both functions are not really instance functions anyway - they really should not rely on an instance I think. By declaring them static it would become safe to use them as class functions without risking loss of backward-compatibility.

[2005-06-18 14:52 UTC] tim at lomointernet dot com

Whoops! I wasn't referring to an older version. I just noticed that my request has already been implemented in the latest release...

Ignore this request.

[2005-06-18 14:53 UTC] tim at lomointernet dot com

wasn't = was