![]() |
Function overloading for modular system?
Hi!
I'm about to create an open source gallery but I have some isues with the design of the system. I have two classes which take care of image and folder handling. One to read a folder with items, and a class to represent an item. http://minna-media.com/files/FiguraC...ram%20v1-1.png But now I would like modular system for both the PathReader and Item. I was thinking about using __call, __get and __set. Of course this would making it modular pretty easy, but is this the best way to go? I made allot of CMS etc, but in the end it never was 100% how I wanted it to be, so this time I want to plan it into its tinyest detail. :) (been thinking of the layout for the system for months already) |
Overloading in PHP simply involves not setting any arguments and calling func_get_args within the function.
|
I want to use it like this:
PHP Code:
|
Something along the lines of the Registry pattern will suit you but with the registry pattern you'll need to allow for the object to initiated first without any arguments and than pass them through.
|
| All times are GMT. The time now is 09:19 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0