Sunday, February 20, 2011

Re: Where to put my own php classes and how to call them

Thanks euromark, that's sure helping !


On 19 fév, 18:33, euromark <dereurom...@googlemail.com> wrote:
> for your sencod problem
> read about "libs" in cake1.3
> thats the way to go with own custom classes
>
> /libs/my_class.php with MyClass class
>
> App::import('Lib', 'MyClass');
>
> On 19 Feb., 19:09, "Krissy Masters" <naked.cake.ba...@gmail.com>
> wrote:
>
> > You're better off using Plugins, "Support for vendor assets have been
> > removed for 1.3.".
>
> > Make your own and simply use it where needed as a Helper / View / Model /
> > Controller /
>
> > There is a specific section in the book dealing with that.
>
> >http://book.cakephp.org/view/1613/Vendor-assets#!/view/1612/Vendor-pa...
>
> > K
>
> > -----Original Message-----
> > From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
>
> > Of Slim
> > Sent: Saturday, February 19, 2011 5:22 AM
> > To: CakePHP
> > Subject: Where to put my own php classes and how to call them
>
> > Hello everyone,
>
> > first, I'm new to cakephp and new to the group, so in advance sorry if
> > i'm posting something not in the right place,
>
> > so t started using cakephp 1.3.7, followed the blog tutorial and
> > pushed successfully a little more than the blog tutorial.
>
> > I have 2 questions :
>
> > 1-I wanna use tcpdf in my app ,I know i must put it in vendors , but
> > what vendors directory ? [root]/vendors or app/vendors ? -and then, if
> > wanna call the tcpdf class, I must give it a call like
> > App::import('Vendor', 'tcpdf'); ?
>
> > 2-now, If i have my own php classes, let's say, a Product,Employee
> > classes , where do I mut put them ? and to call them I guess it's same
> > as my firts question : something like  App::import('[directory]',
> > 'Product'); ??
>
> > Thks in advance,
>
> > Slim
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > 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 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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate