note 93643 deleted from language.oop5 by danbrown
| From: | danbrown@php.net | Date: | Mon, 21 Sep 2009 14:10:41 +0000 |
| Subject: | note 93643 deleted from language.oop5 by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160892@lists.php.net to get a copy of this message | ||
Note Submitter: dave at davecomeau dot net
----
One thing I've gotten to dislike about OO programming in PHP are the countless files scattered
all over that simply instantiate my class, so I wrote a class to convert URLs into method calls.
This, combined with an .htaccess file, allows you to have one file that instantiates your class, you
just have to implement methods that match up to your URLs. Whenever you create a new page, all you
need to do is write a new method and update your class file on the server.
You can get the class and download an example here: http://www.davecomeau.net/blog/17/PHP+Class%3A+ObjectOrientedURLs