You could always just include it as a 'require_once' in the bootstrap.
On Oct 11, 12:24 pm, Ed Propsner <[email protected]> wrote: > I'm trying to load Facebook's php sdk. I'm currently using App::import. > I'm loading it into the App Controller but the problem I'm having now is > that the class is only available within that controller and not accessible > to the rest of my controllers. > > - Ed > > > > > > > > On Mon, Oct 10, 2011 at 9:12 PM, Miles J <[email protected]> wrote: > > If its for models, use ClassRegistry::init(). > > > If you are including files, use App::import(). > > > If you are adding a file to the lookup, use App::uses(). > > >https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Core/App.php#L549 > > > On Oct 10, 9:20 am, CrotchFrog <[email protected]> wrote: > > > I'm still trying to figure out how to get function __ construct() to > > > work properly for me, it throws errors when used the way I > > > traditionally used it. I'm also still unsure whether I should be using > > > App::import() or App::uses(). I would tend to think App::import() but > > > like I said I'm a little fuzzy in this area. > > > > Thanks, > > > > - Ed > > > > On Oct 9, 6:09 am, CrotchFrog <[email protected]> wrote: > > > > > I'm a bit confused in the proper use of App::import() vs. App::uses() > > > > in migrating to 2.0. > > > > > I'm try to load the Facebook php sdk from the Vendor folder as I used > > > > to in 1.3. > > > > > In 1.3 what worked for me was : > > > > > App::import('Vendor', 'facebook) > > > > > function __construct(){ > > > > parent::__construct(); > > > > > $this->facebook = new Facebook(array( > > > > 'appId' => $this->__api_key, > > > > 'secret' => $this->__app_secret )); > > > > } > > > > > How should I be using the Constructor with App::uses()? > > > > I've been through the Migration Guide to 2.0 and can see there has > > > > been obvious changes but I suppose I don't have a clear enough > > > > understanding to work out what I should be doing differently here. > > > > > - Ed > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
