Something like this should do it:
App::import('Vendor', 'wshelper'.DS.'lib'. DS . 'myclass');
or
App::import('Vendor', 'myclass', array('file' => 'wshelper'.DS.'lib'.
DS . 'myclass.php'));
hth
On Jun 12, 6:01 pm, avairet <[EMAIL PROTECTED]> wrote:
> Just an update: my custom class is stored in "app/vendors/wshelper/
> lib" of course!
>
> On 12 juin, 17:47, avairet <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to use a custom class (which is stored in my "app/vendors"
> > directory) in a custom Component, but I've always PHP warnings that
> > say ''Fatal error: Class 'MyClass' not found"
>
> > Here is my App::import call and my class definition
>
> > <?php
> > App::import('vendor', 'MyClass', false, 'wshelper'.DS.'lib');
>
> > class MyComponentComponent extends Object {
>
> > function initialize() {
>
> > }
>
> > function startup(&$controller) {
>
> > }
>
> > }
>
> > ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---