Hello!
So I'm in the process of upgrading to Cake 1.2 (from an earlier beta,
I believe), and I'm switching from the vendors() function to the
App::import function. According to
http://book.cakephp.org/view/499/The-App-Class,
there's an example that's close to what I want to do:
App::import('Vendor', 'flickr/flickr');
However, my class is in ResultSet.php, and since I've got a couple of
these, I put them all into the vendors/StudentTracker file.
So naturally I tried
App::import('Vendor', 'StudentTracker/ResultSet');
I expected this to work, but it didn't. After putting some handy
printf's*cough*debug statements into App::__load, I noticed that Cake
is inflecting the name I gave it. It's both lowercasing the path, and
putting underscores in.
My question is this: am I doing this wrong, or is this a bug? I ask
because I was under the impression that the 'vendors' directory wasn't
supposed to make any assumptions about how the directories/files were
named, and therefore it seems like inflecting the provided filename
would therefore be wrong.
It appears to be pretty easy to hack a change into the core Cake files
(see http://bin.cakephp.org/view/1215188782), although I've no idea
how it will affect anything else (haven't even run the unit tests)
Anyways - am I wrong about the vendors files not needing inflection,
or is this a bug?
Thanks!
--Mike
P.S.
It appears that I can forcibly direct Cake to the right file using the
following, in case anyone else is using this post as a 'help file' :)
App::import( 'Vendor', 'StudentTracker/ResultSet', array('file' =>
'StudentTracker'.DS.'ResultSet.php'));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---