Tuesday, February 28, 2012

App::import() in 2.x

I'm attempting to port Nick Baker's FileUpload plugin to 2.x but am
running into class not found errors. He used a separate
FileUploadSettings class that's in the config folder. I've renamed the
folder Config and the file FileUploadSettings.php. Then I've changed
the import line in the component.

//App::import('Config', 'FileUpload.file_upload_settings');
App::import('FileUploadSettings', 'FileUpload.Config');

But no dice. I also tried 'Plugin.FileUpload.Config'. Could someone
please explain how import is supposed to work now? For the basic
things, it seems pretty straightforward, but I'm lost for something
like this.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: