View Full Version : some help with php classes please
zoomfreddy
05-07-2003, 06:54 AM
Ok been doing all the Jesse's tuts on amfphp and every thing goes ok.
Right now im trying to convert some php functions(used with AS "loadVars" obj) on some php/mysql online mini store with flashMX front end to the remoting version.
Can some one trow me some light here about constructing php classes(also AS clasess will help).
Any help or pointers to the right direction are really apreciated!:)
freddycodes
05-08-2003, 05:29 PM
Are you familiar with classes at all in PHP, you would just need to overhaul your procedural code in PHP to classes, meaning OOP, meaning data encapsulation. Not sure what you are looking for, are you looking for tutorials on classes in PHP, examples, etc...?
zoomfreddy
05-08-2003, 10:17 PM
Hi there Freddycodes...hehe, sounds like me with other nick...
any help/tuts/examples with php- AS classes in general is usefull, been doing some OOP, but haven't made any class yet, and i noticed the need to encapsulate php functions in to classes for remoting stuff, always want to extend my knowledge, you know how this is :).
thanks FYH.
zoomfreddy
05-20-2003, 06:24 AM
no tips/help/links at all?...
freddycodes
05-20-2003, 06:11 PM
Yeah sorry I forgot about this thread. Check into
www.phppatterns.com
www.phpclasses.com
www.devshed.com
zoomfreddy
05-21-2003, 02:43 AM
hey!!!, thanks for the links( some time ago i looked in to phpclasses site...nice)
the other 2 look interesting...ok, lets start with the questions:
do you know where to find some practical example?..., i been reading the theory for the classes, but haven't got the logic behind yet(looks like black magic to me :)), i mean, is there a difference in using just functions instead of functions inside classes for small projects/apps?(i read that there is indeed difference on large projects).
As far as i understand, the classes are similar to prototypes, but you can make available all the stuff inside until you need it, and that is what you get with functions...(here is where im loosing it)
if this is correct, what are the advantages? correct me if im wrong, please.
freddycodes
05-21-2003, 03:30 AM
I would really give a crappy answer, I am still learning all there is to know about OOP. Basically classes are abstract representatiions of objects. Complete with methods(functions) and properties. Objects are instances of that class.
Read more here.
http://www.sitepointforums.com/showthread.php?threadid=59898
zoomfreddy
05-21-2003, 08:27 AM
that thread rocks... thanks a lot freddycodes!!! i start to see the light, yeeeesss!.
As it turns, i am 100% procedural guy(i make almost every flash stuff with custom functions/prototypes...mmm...lets blame Jesse and Collin moock for this :) )...long learning curve coming this way...yummy.
just in case someone else have the same questions:
Keywords: classes Classes OOP Oop oop
;)
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.