Re: API Thoughts?
| From: | Chuck Hagenbuch | Date: | Mon, 27 Aug 2001 03:53:12 +0000 |
| Subject: | Re: API Thoughts? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64371@lists.php.net to get a copy of this message | ||
Quoting Sterling Hughes <sterling@designmultimedia.com>:
> Jep -- I'm writing PEAR OO wrappers for every ADT that I implement
> in a functional manner. I'm think for the OO wrappers, seperate
> class names wouldn't be horrible, something like:
>
> $tree = new AVLTree;
Please stick to the naming conventions, which would make this:
$tree = new ADT_Tree_AVL();
... or something similar. Also, you could easily have a factory method:
$tree = ADT::factory('tree_avl');
or:
$tree = ADT_Tree::factory('avl');
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
Some fallen angels have their good reasons.