Hello,
I have been working for some time now on a PHP OOP database abstraction
layer. Yes I know there are others out there which are maturing but I like
reinventing this wheel.
The task I have at hand is that I want to specify 'has a' and 'has many'
relationships in an array for each class and use these to automagically
create the accessor methods and perhaps mutator methods as well.
Can anyone point me to a good reference on creating class methods on the fly
in PHP?
I have spent the afternoon studying how Perl's lovely Class::DBI handles
this but I can't get my head around how I would create these methods based
on my array values in PHP.
Any pointers and links greatly appreciated!
jg
I have been working for some time now on a PHP OOP database abstraction
layer. Yes I know there are others out there which are maturing but I like
reinventing this wheel.
The task I have at hand is that I want to specify 'has a' and 'has many'
relationships in an array for each class and use these to automagically
create the accessor methods and perhaps mutator methods as well.
Can anyone point me to a good reference on creating class methods on the fly
in PHP?
I have spent the afternoon studying how Perl's lovely Class::DBI handles
this but I can't get my head around how I would create these methods based
on my array values in PHP.
Any pointers and links greatly appreciated!
jg
Comment