I think this is something that should be mentioned in the Cake manual.
How do I propose such a change in the manual?

Jos


On May 22, 3:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > - Could it be the case that there was a name collision?
>
> Yes, there is a class called File in the cake core.
>
> > - Is there a way to avoid these collisions? If so, how?
>
> Yes there is. Print out the list of declared classes, and avoid those
> names. Put this code in one of your views:
> <pre><?php print_r(get_declared_classes()); ?></pre>
>
> That list show both cake and php classes, but it is not exhaustive, as
> it only show the classes that have been declared in that request. To
> see all cake classes simply look at the 
> api:http://api.cakephp.org/1.2/classes.htmlhttp://api.cakephp.org/classes.html
>
> Of course cakePHP is still evolving, so you may encounter collisions
> in future releases. To be completely safe, use Chris' suggestion and
> add a prefix to your class names.  I almost always use prefixes in
> components, helpers and... pretty much everything except models.
>
> Since most models are specific to a project, collisions should not be
> very common.  If you give your models specific names, then you are not
> likely to have a collision; File and Folder are the exceptions!
>
> cook
>
> On May 21, 8:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > I want to share my experience and I have a two questions.
>
> > But first my experience:
> > It took me a couple of days to find a bug I myself introduced in my
> > code.
>
> > I tried to make the 'log'-function work but what ever I did it raised
> > the following error:
> > Query: append
> > Warning: SQL Error: 1064: You have an error in your SQL syntax; check
> > the manual that corresponds to your MySQL server version for the right
> > syntax to use near 'append' at line 1 in C:\Program Files\xampplite
> > \htdocs\cake\cake\libs\model\datasources\dbo_source.php on line 476
>
> > At first I thought there was a bug in the Cake framework. So I filed a
> > bug,https://trac.cakephp.org/ticket/2593. He, don't blame
> > yourself  ;-)  Well it wasn't a bug, obviously.
>
> > I used a model called 'File' in my application. And that's where the
> > problem was, at least I think so.
> > File is a class used in the Cake framework. And I think this caused
> > some sort of namecollision with my own File-model. After changing my
> > File-model to another name the trouble disappeared. :-) :-) :-)
>
> > Now my questions:
> > - Could it be the case that there was a name collision?
> > - Is there a way to avoid these collisions? If so, how?
>
> > Back to coding,
> > Jos


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to