On 11/17/05, Peter Speltz <[EMAIL PROTECTED]> wrote:
> > I've just come across something a bit inelegant in the mapping of
> > path/table to classes.
> >
> > The hack I have just used is :
> > PukkaEcommerce::Frontend->config->{table_to_class}{Information} =
> > 'PukkaEcommerce::Information';
> >
> > I am looking at providing a nice API to handle this kind of thing,
>
> I'm not real clearly understanding what kind of thing you are trying
> to handle. Are you wanting to set the table to class mapping
> manually to override the base model's class_of($r, $table) results?
> Or you want a better implementation of class_of or you have no
> class_of in your model ?
I'm replacing the custom mod_perl frontend to pukka plants, it already
uses CDBI and TT, with maypole for the admin of the site.
However, I found that there wasn't a clear way to make
http://url.to/Information/foo/bar use the Information class because
the Information class had the table set as 'content' and I will be
using the same database.
I munged the class_of stuff and that seemed to fix it, but I should be
able to specify what class maps to which 'table'. That piece of code
is called in the driver after setup.
> I ran into issue with class_of. I did not have $r handy to pass to
> class_of. A ubiquitous $r would help but perhaps a class_of
> implementation without needing $r would be ideal. I have no idea how
> that would be implemented, except a map hash stored in the base model
> at setup. Mabe that violates some MVC boundaries though.
I didn't need $r for that, can't imagine why you would need access to
any request variables.
Cheers,
A.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel