Re: [PHP] classes and variables

2010-05-03 Thread Israel Ekpo
You do not need to access $DB as a global variable Since $db_database is a property of search_helper, you can initialize it by passing a value via the constructor like this class search_helper extends AjaxACApplication { protected $db_database; public function __construct($database_nam

[PHP] classes and variables

2010-05-03 Thread Merlin Morgenstern
Hi there, I am new to classes in PHP and do want to change a class that has been in a package I downloaded. I do simply want to access a variable from outside. This is the code: class search_helper extends AjaxACApplication { //global $DB; var $db_database = '

Re: [PHP] Classes and Functions

2009-11-02 Thread Martin Scotta
On Sun, Nov 1, 2009 at 6:46 PM, Larry Garfield wrote: > On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote: > > Hello, > > > > Is there a way to see what objects and functions a script > > loaded/required/used? > > > > I could recursively loop through the globals, but if objects were unset,

Re: [PHP] Classes and Functions

2009-11-01 Thread Larry Garfield
On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote: > Hello, > > Is there a way to see what objects and functions a script > loaded/required/used? > > I could recursively loop through the globals, but if objects were unset, > then i may miss some. > > I could make a 'tracking' object and ever

Re: [PHP] Classes and Functions

2009-11-01 Thread Mathieu Rochette
On Sun, Nov 1, 2009 at 9:50 PM, Daniel Kolbo wrote: > Hello, > > Is there a way to see what objects and functions a script > loaded/required/used? > I don't think it's possible to that in PHP code. > > I could recursively loop through the globals, but if objects were unset, > then i may miss som

[PHP] Classes and Functions

2009-11-01 Thread Daniel Kolbo
Hello, Is there a way to see what objects and functions a script loaded/required/used? I could recursively loop through the globals, but if objects were unset, then i may miss some. I could make a 'tracking' object and every time i load/include a file (which contains a class def or a function de

Re: [PHP] Something I don't understand about PHP classes

2009-05-09 Thread chetan rane
Hi you can use the following code On Sat, May 9, 2009 at 10:16 PM, Robert Cummings wrote: > On Sat, 2009-05-09 at 18:35 +0200, Cesco wrote: > > Ok, I suppose that this should be a very simple problem and probably > > the answer is obvious, but I really can't understand how the classes > > and th

Re: [PHP] Something I don't understand about PHP classes

2009-05-09 Thread Robert Cummings
On Sat, 2009-05-09 at 18:35 +0200, Cesco wrote: > Ok, I suppose that this should be a very simple problem and probably > the answer is obvious, but I really can't understand how the classes > and the rest of the stuff works in PHP... > > Let's suppose that we have this piece of code: > > >

[PHP] Something I don't understand about PHP classes

2009-05-09 Thread Cesco
Ok, I suppose that this should be a very simple problem and probably the answer is obvious, but I really can't understand how the classes and the rest of the stuff works in PHP... Let's suppose that we have this piece of code: I have put an infinite loop in the class constructor just to

Re: [PHP] classes

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 2:25 pm, nihilism machine wrote: > if i declare an instance of a class in the top of my php file, then > have html, then later on user $myClassInstance->myMethod(); -- > myMethod() does not execute, only when i have the instantiation of the > class right before the call to

Re: [PHP] classes

2008-02-18 Thread Shawn McKenzie
Nick Stinemates wrote: > Shawn McKenzie wrote: >>> What part of my example was unclear? >>> >>> >> All of it, since I posted just a couple minutes after you and I hadn't >> seen your post yet. >> >> > I'm sorry, I thought were were responding WHAT?!? to me. > > I'm going to blame thunderbi

Re: [PHP] classes

2008-02-18 Thread Nick Stinemates
Shawn McKenzie wrote: >> What part of my example was unclear? >> >> > All of it, since I posted just a couple minutes after you and I hadn't > seen your post yet. > > I'm sorry, I thought were were responding WHAT?!? to me. I'm going to blame thunderbird for looking like you responded to m

Re: [PHP] classes

2008-02-18 Thread Shawn McKenzie
Nick Stinemates wrote: > Shawn McKenzie wrote: >> Jay Blanchard wrote: >> >>> [snip] >>> if i declare an instance of a class in the top of my php file, then >>> have html, then later on user $myClassInstance->myMethod(); -- >>> myMethod() does not execute, only when i have the instantiation

RE: [PHP] classes

2008-02-18 Thread Jay Blanchard
[snip] > http://www.php.net/flush Huh, what?!?! to both of you: [/snip] My bad...I had a total brain fart and 'combined' some concepts that I was speaking to someone about off-list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] classes

2008-02-18 Thread Nick Stinemates
Shawn McKenzie wrote: > Jay Blanchard wrote: > >> [snip] >> if i declare an instance of a class in the top of my php file, then >> have html, then later on user $myClassInstance->myMethod(); -- >> myMethod() does not execute, only when i have the instantiation of the >> class right before

Re: [PHP] classes

2008-02-18 Thread Shawn McKenzie
Jay Blanchard wrote: > [snip] > if i declare an instance of a class in the top of my php file, then > have html, then later on user $myClassInstance->myMethod(); -- > myMethod() does not execute, only when i have the instantiation of the > class right before the call to the method does it wor

Re: [PHP] classes

2008-02-18 Thread Stut
nihilism machine wrote: if i declare an instance of a class in the top of my php file, then have html, then later on user $myClassInstance->myMethod(); -- myMethod() does not execute, only when i have the instantiation of the class right before the call to the method does it work. any ideas?

Re: [PHP] classes

2008-02-18 Thread Nick Stinemates
Jay Blanchard wrote: > [snip] > if i declare an instance of a class in the top of my php file, then > have html, then later on user $myClassInstance->myMethod(); -- > myMethod() does not execute, only when i have the instantiation of the > class right before the call to the method does it wor

RE: [PHP] classes

2008-02-18 Thread Jay Blanchard
[snip] if i declare an instance of a class in the top of my php file, then have html, then later on user $myClassInstance->myMethod(); -- myMethod() does not execute, only when i have the instantiation of the class right before the call to the method does it work. any ideas? [/snip] You are

[PHP] classes

2008-02-18 Thread nihilism machine
if i declare an instance of a class in the top of my php file, then have html, then later on user $myClassInstance->myMethod(); -- myMethod() does not execute, only when i have the instantiation of the class right before the call to the method does it work. any ideas? -e -- PHP General Mai

Re: [PHP] Classes - Dumb question

2007-10-15 Thread Nathan Nobbe
On 10/15/07, Larry Garfield <[EMAIL PROTECTED]> wrote: > > On Monday 15 October 2007, Nathan Nobbe wrote: > > On 10/15/07, tedd <[EMAIL PROTECTED]> wrote: > > > I understand the class concept. But, I am not familiar with autoload. > > > > > > Stut also made mention of that, so I shall investigate p

Re: [PHP] Classes - Dumb question

2007-10-15 Thread Larry Garfield
On Monday 15 October 2007, Nathan Nobbe wrote: > On 10/15/07, tedd <[EMAIL PROTECTED]> wrote: > > I understand the class concept. But, I am not familiar with autoload. > > > > Stut also made mention of that, so I shall investigate post haste. > > __autoload is pretty tight; but if you dont want to

Re: [PHP] Classes - Dumb question

2007-10-15 Thread Nathan Nobbe
On 10/15/07, tedd <[EMAIL PROTECTED]> wrote: > > I understand the class concept. But, I am not familiar with autoload. > > Stut also made mention of that, so I shall investigate post haste. __autoload is pretty tight; but if you dont want to have all your class files in the same directory, i sugg

RE: [PHP] Classes - Dumb question

2007-10-15 Thread tedd
At 5:42 AM -0500 10/15/07, Jay Blanchard wrote: [snip] With a class you can inherit all of the base class functionality into a new customer type. You do not have to break open the base class to add a case, you just have to create an extension class. Documentation is unique to each class. No ma

Re: [PHP] Classes - Dumb question

2007-10-15 Thread Nathan Nobbe
On 10/15/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > [snip] > >With a class you can inherit all of the base class functionality > >into a new customer type. You do not have to break open the base > >class to add a case, you just have to create an extension class. > >Documentation is unique to

RE: [PHP] Classes - Dumb question

2007-10-15 Thread Jay Blanchard
[snip] >With a class you can inherit all of the base class functionality >into a new customer type. You do not have to break open the base >class to add a case, you just have to create an extension class. >Documentation is unique to each class. No matter what, you have to break something open t

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Christian Hänsel
""Jay Blanchard"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] [snip] First of all what you call "normal" is procedural or functional programming. There is nothing wrong with doing things this way and may be especially quick and efficient when doing basic web sites and

RE: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 9:03 AM -0500 10/12/07, Jay Blanchard wrote: tedd said: In either case, I still have to write more code to accommodate scaling. And, if I have more customer types, then it's a simple matter to add more customer functions and addition case statements to the initial customer function. I don't s

Re: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 2:44 PM +0100 10/12/07, Stut wrote: You can limit the need to add more code like so... function customer($whatWas, $customertype, $whatAdditional) { /* do "what was" (i.e., common to all) */ /* then do what's additional unique to type */ $func = strtolower($customertype).'Customer

RE: [PHP] Classes - Dumb question

2007-10-12 Thread Jay Blanchard
[snip] > First of all what you call "normal" is procedural or functional > programming. There is nothing wrong with doing things this way and may be > especially quick and efficient when doing basic web sites and applications. > Document well and you will have no problem maintaining your code. One

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Nathan Nobbe
On 10/12/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > No doubt. (are you by chance continuing the other argument, re: > interfaces?), but you have to break open the original tested function, add > code to it, test it, etc. Every time you add a new case you have to break > open the existing func

RE: [PHP] Classes - Dumb question

2007-10-12 Thread Jay Blanchard
[snip] Yes, but I could do that procedurally from within the customer function by simply adding a customer type (needed regardless) and using a switch to direct and collect the additional data needed. In either case, I still have to write more code to accommodate scaling. And, if I have

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Stut
tedd wrote: function customer($whatWas, $customertype, $whatAdditional) { /* do "what was" (i.e., common to all) */ /* then do what's additional unique to type */ switch(1) { case $customertype =='Commercial': commercialCustomer($whatAdditional); break; ..

RE: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 7:36 AM -0500 10/11/07, Jay Blanchard wrote: [snip] okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the "normal" functions all the time. I have never even bothered working with classes, but now I

Re: [PHP] Classes - Dumb question

2007-10-11 Thread Nathan Nobbe
On 10/12/07, Larry Garfield <[EMAIL PROTECTED]> wrote: > > On Thursday 11 October 2007, Jay Blanchard wrote: > > [snip] > > okay, this is really (!) embarassing, but I have to ask: > > > > Why would I want to use classes in PHP? > > > > I have been using PHP for years now and writing the "normal" f

Re: [PHP] Classes - Dumb question

2007-10-11 Thread Larry Garfield
On Thursday 11 October 2007, Jay Blanchard wrote: > [snip] > okay, this is really (!) embarassing, but I have to ask: > > Why would I want to use classes in PHP? > > I have been using PHP for years now and writing the "normal" functions all > the time. I have never even bothered working with classe

RE: [PHP] Classes - Dumb question

2007-10-11 Thread Jay Blanchard
[snip] Not trying to hijack the thread... Hopefully this is related enough, if not I apologize. Would a good use of a class be to write a generic database connection script? and then feed in the different variables, such as customer login, database, stuff like that? something like class DBCo

RE: [PHP] Classes - Dumb question

2007-10-11 Thread Robert Cummings
On Thu, 2007-10-11 at 07:36 -0500, Jay Blanchard wrote: > [snip] > okay, this is really (!) embarassing, but I have to ask: > > Why would I want to use classes in PHP? > > I have been using PHP for years now and writing the "normal" functions all > the time. I have never even bothered working wi

Re: [PHP] Classes - Dumb question

2007-10-11 Thread Jason Pruim
On Oct 11, 2007, at 8:36 AM, Jay Blanchard wrote: [snip] okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the "normal" functions all the time. I have never even bothered working with classes, but

RE: [PHP] Classes - Dumb question

2007-10-11 Thread Jay Blanchard
[snip] okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the "normal" functions all the time. I have never even bothered working with classes, but now I would love to know what makes the classes so sp

[PHP] Classes - Dumb question

2007-10-11 Thread Christian Hänsel
Howdy fellas, okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the "normal" functions all the time. I have never even bothered working with classes, but now I would love to know what makes the clas

Re: [PHP] Classes and access to outside variables

2007-10-01 Thread Nathan Nobbe
On 10/1/07, Merlin <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > thank you for all your answers. I am sorry but I just realized that > there is an huge difference between PHP5 and PHP4 considering OOP. > Unfortunatelly I am still running PHP4.x and cant change this over > night. However I sti

Re: [PHP] Classes and access to outside variables

2007-09-30 Thread Martin Alterisio
ds AjaxACApplication > { > /** > * Database connection details > */ > >// announce global variable before use it >global $dbh; > > $db_hostname = $dbh; > > > ... > > Regards, > Ryu > > >

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread Nathan Nobbe
On 9/30/07, 潘志彬 <[EMAIL PROTECTED]> wrote: > > $dbh = 'test'; > > class search_helper extends AjaxACApplication > { > /** > * Database connection details > */ > >// announce global variable before use it >global $dbh; > > $db_hostname = $dbh;

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread 潘志彬
AIL PROTECTED]>: > > Hi there, > > I am new to PHP classes and I do want to access a variable outside the > class, but somehow that does not work. global also does not have any > effect. > > In the following example I would like to be able to access $dbh from > inside

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread Nathan Nobbe
gt; Hi there, > > I am new to PHP classes and I do want to access a variable outside the > class, but somehow that does not work. global also does not have any > effect. > > In the following example I would like to be able to access $dbh from > inside the class like I did in

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread Martin Alterisio
Refer to the global on the constructor. Anyway, using a global like that is not a good practice. Just pass the variable to the constructor. 2007/9/29, Merlin <[EMAIL PROTECTED]>: > > Hi there, > > I am new to PHP classes and I do want to access a variable outside the > cl

[PHP] Classes and access to outside variables

2007-09-29 Thread Merlin
Hi there, I am new to PHP classes and I do want to access a variable outside the class, but somehow that does not work. global also does not have any effect. In the following example I would like to be able to access $dbh from inside the class like I did in that example. This does not work

Re: [PHP] All-in-one PHP Classes

2007-02-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-08 01:14:43 +0100: > 290function setOptions(&$db, $options) > 291{ > 292if (is_array($options)) { > 293foreach ($options as $option => $value) { > 294$test = $db->setOption($option, $value); > 295if (PEAR::isE

Re: [PHP] All-in-one PHP Classes

2007-02-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-08 11:27:13 +1100: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100: > >>Roman Neuhauser wrote: > >>># [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: > Have been reading posts daily for two months now on the list, and > am very please

Re: [PHP] All-in-one PHP Classes

2007-02-07 Thread Chris
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: Have been reading posts daily for two months now on the list, and am very pleased at how informative these can be. I have noticed, many examples where

Re: [PHP] All-in-one PHP Classes

2007-02-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-07 09:59:15 +1100: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: > >>Have been reading posts daily for two months now on the list, and am very > >>pleased at how informative these can be. > >>I have noticed, many examples where one is poi

Re: [PHP] All-in-one PHP Classes

2007-02-06 Thread Richard Lynch
On Tue, February 6, 2007 5:47 am, Tim wrote: > Shouldn't these classes be perhaps broken down into usefull "parts". Many of them started life as very small classes, and then the Feature Requests started pouring in and... Do feel free to take a class and delete all the bits you're not using, if yo

Re: [PHP] All-in-one PHP Classes

2007-02-06 Thread Robert Cummings
On Wed, 2007-02-07 at 09:59 +1100, Chris wrote: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: > >> Have been reading posts daily for two months now on the list, and am very > >> pleased at how informative these can be. > >> I have noticed, many examples where one is

Re: [PHP] All-in-one PHP Classes

2007-02-06 Thread Chris
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: Have been reading posts daily for two months now on the list, and am very pleased at how informative these can be. I have noticed, many examples where one is pointed to using classes downloadable on the internet. This is

Re: [PHP] All-in-one PHP Classes

2007-02-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-06 12:47:47 +0100: > Have been reading posts daily for two months now on the list, and am very > pleased at how informative these can be. > I have noticed, many examples where one is pointed to using classes > downloadable on the internet. > This is when i realized h

[PHP] Re: All-in-one PHP Classes

2007-02-06 Thread setcookie
there are special design patterns for autoloading classes and subclasses to use only we needed at runtime! this together with singeltons pattern will prevent any memory overflows. problem is that almost nobody implements these patterns when designing "standalone" classes fra* Hello folks, Have

[PHP] All-in-one PHP Classes

2007-02-06 Thread Tim
Hello folks, Have been reading posts daily for two months now on the list, and am very pleased at how informative these can be. I have noticed, many examples where one is pointed to using classes downloadable on the internet. Not a very big user of these classes my self (maybe a bit naïf in thi

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Jochem Maas
Martin Alterisio wrote: > Forgot to mention that calling a non-static function this way should > generate an E_STRICT warning. and IIRC it will eventually be made a fatal error in php6, somebody please correct me if I'm wrong! > > 2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>: >> >> Backward c

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Forgot to mention that calling a non-statical function this way should generate an E_STRICT warning. 2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>: Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing a static context instead of an object instance. 2007/1/16, Cheseldine, D. L. <[EMAIL PROTECTED]>: Hi I'm stuck on The Basics page of the php5 Object

RE: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Jay Blanchard
[snip] http://uk.php.net/manual/en/language.oop5.basic.php The top example has the code: A::foo(); even though foo is not declared static in its class. How does it get called statically without being declared static? [/snip] foo() is a function and would not be static, it can be public (defau

[PHP] classes and objects: php5. The Basics

2007-01-16 Thread Cheseldine, D. L.
Hi I'm stuck on The Basics page of the php5 Object Model: http://uk.php.net/manual/en/language.oop5.basic.php The top example has the code: A::foo(); even though foo is not declared static in its class. How does it get called statically without being declared static? regards dave -- PHP Gen

Re: [PHP] Classes and OOP

2006-03-07 Thread Anthony Ettinger
On 3/7/06, Wolf <[EMAIL PROTECTED]> wrote: > I'm looking for a couple of good books or online sources where I can get > a lot better grasp of Classes and OOP programming in general. Mostly I > use PHP so that is the best option. > > Thanks, > Robert > PHP5 - Objects, Patterns, and Best Practices

Re: [PHP] Classes and OOP

2006-03-07 Thread Kim Hunter
PHP5 Objects, Patterns and Practice 1590593804 - Matt Zandstra - Apress This is a good way to get a good grasp of object-oriented programming covers the basics of uml as well as using decent examples to explain the use of objective programming (unlike all the web sites out there that i tried to

[PHP] Classes and OOP

2006-03-07 Thread Wolf
I'm looking for a couple of good books or online sources where I can get a lot better grasp of Classes and OOP programming in general. Mostly I use PHP so that is the best option. Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] classes and return values

2006-02-27 Thread Jochem Maas
Jason Gerfen wrote: I am attempting to work up a class and because I am unfamiliar with some of the code flow I am only able to get a return value of 'object'. How can I pull the data out of a class? which data? It doesn't seem as if anyone knows what your trying to do. (try to explain it aga

[PHP] classes and return values

2006-02-27 Thread Jason Gerfen
I am attempting to work up a class and because I am unfamiliar with some of the code flow I am only able to get a return value of 'object'. How can I pull the data out of a class? Any help, or pointers on what I am doing wrong is appreciated. class myAuth { var $user; var $pass; var $lvl; var

[PHP] php classes and data retrieval

2006-01-27 Thread robert
Hello! I have a database and php classes and I'm not sure the best way I should be retrieving the data. as below, if 'other' (line 9) is stored in the database as an id of a record in another table, should my getData() method: a. return the id as part of the MyObj obje

RE: [PHP] Classes/Objects - Books/Links?

2005-12-06 Thread Mark Steudel
] Sent: Tuesday, December 06, 2005 6:37 PM To: php-general@lists.php.net Subject: [PHP] Classes/Objects - Books/Links? Hello, I want to learn about classes and objects in PHP. (IMHO) I would say that my understanding of functions is very good. Any books that you could suggest that specifically

Re: [PHP] Classes/Objects - Books/Links?

2005-12-06 Thread Michael Hulse
On Dec 6, 2005, at 6:39 PM, Chris Shiflett wrote: Adam Trachtenberg's Upgrading to PHP 5 (O'Reilly) is a good book. It covers all of the new features in PHP 5 (so it's not just OOP, sorry), but the chapter on objects is excellent. Hi Chris, thanks for the quick response. :) That book sounds g

Re: [PHP] Classes/Objects - Books/Links?

2005-12-06 Thread Chris Shiflett
Michael Hulse wrote: Any books that you could suggest that specifically address just classes/objects? Adam Trachtenberg's Upgrading to PHP 5 (O'Reilly) is a good book. It covers all of the new features in PHP 5 (so it's not just OOP, sorry), but the chapter on objects is excellent. Chris -

[PHP] Classes/Objects - Books/Links?

2005-12-06 Thread Michael Hulse
Hello, I want to learn about classes and objects in PHP. (IMHO) I would say that my understanding of functions is very good. Any books that you could suggest that specifically address just classes/objects? How-a-bout sites/links/tutorials on the web? I am hoping that by learning how to use

Re: [PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Robin Vickery
On 11/4/05, Unknown Unknown <[EMAIL PROTECTED]> wrote: > Hi everyone, i have some code that proccesses a login form. i have an object > $DB which works only in SOME areas, this is the code: > [...] > $DB="membersp"; > $SQL="SELECT ID FROM membersonline WHERE ID='$ID' "; > $DB->Query($SQL); [...] >

Re: [PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Jasper Bryant-Greene
On Thu, 2005-11-03 at 18:37 -0500, Unknown Unknown wrote: > Hi everyone, i have some code that proccesses a login form. i have an object > $DB which works only in SOME areas, this is the code: > > require_once("Include.php"); > global $DB; There is no need to global $DB here. You are already in

[PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Unknown Unknown
Hi everyone, i have some code that proccesses a login form. i have an object $DB which works only in SOME areas, this is the code: Query($SQL); $UserInfo=$DB->QueryInfo("Array"); if($UserInfo==0) $Login="FALSE"; else $Login="TRUE"; //Make Sure the user is not a duplicate user trying to log in agai

RE: [PHP] Classes and Functions

2005-11-03 Thread Shaw, Chris - Accenture
STFW >-Original Message- >From: Unknown Unknown [mailto:[EMAIL PROTECTED] >Sent: 03 November 2005 00:05 >To: Jasper Bryant-Greene >Cc: php-general@lists.php.net >Subject: Re: [PHP] Classes and Functions > > >Oh thanks agai

Re: [PHP] Classes and Functions

2005-11-03 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote: On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: Oh thanks again and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. "Fondu"?? *licks lips* you missed an '

Re: [PHP] Classes and Functions

2005-11-02 Thread Robert Cummings
On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote: > On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: > > Oh thanks again > > and what does RTFM mean? > > Read The [insert your favourite word beginning with F here] Manual. "Fondu"?? *licks lips* Cheers, Rob. -- .

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: > Oh thanks again > and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p:

Re: [PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
Oh thanks again and what does RTFM mean?

Re: [PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
A thanks, i tried that before didn't seem to work, now it works Thanks again!

Re: [PHP] Classes and Functions

2005-11-02 Thread Manish Marathe
On 11/2/05, Unknown Unknown <[EMAIL PROTECTED]> wrote: > > Hi everybody i have a class that i reference with: > $DB= new DBInterface; > outside a function it works fine, but using $DB inside a function changes > the data type i think... i get an error saying i'm using a method on a > non-object...

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
On Wed, 2005-11-02 at 18:56 -0500, Unknown Unknown wrote: > Hi everybody i have a class that i reference with: > $DB= new DBInterface; > outside a function it works fine, but using $DB inside a function changes > the data type i think... i get an error saying i'm using a method on a > non-object...

[PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
Hi everybody i have a class that i reference with: $DB= new DBInterface; outside a function it works fine, but using $DB inside a function changes the data type i think... i get an error saying i'm using a method on a non-object... any help appreciatted

Re: [PHP] Classes or functions

2005-10-19 Thread Brent Baisley
It's really a matter of comfort level and opinion. There can be strong arguments either way. Using just functions will be faster, although the speed difference may be minimal and not noticeable. Using just functions can be easier and quicker to develop, especially for small projects. But,

[PHP] Classes or functions

2005-10-19 Thread Khorosh Irani
What this methods are better for php4? classes or functions Does it better to use classes when I can write the codes with functions? Excuseme for my bad english

[PHP] Classes or functions

2005-10-19 Thread Khorosh Irani
What this methods are better for php4? classes or functions Does it better to use classes when I can write the codes with functions? Excuseme for my bad english

Re: [PHP] Classes, Constructors, References and Recursion

2005-04-20 Thread Evert | Rooftop Solutions
Jochem Maas wrote: also I believe print_r() and var_dump() have a few odditities regarding display of recursion with regard to objects... internals mailinglist archive might tell you more on that. I think I have the answer, when I pass a var to print_r it isn't passed by reference, so there will

Re: [PHP] Classes, Constructors, References and Recursion

2005-04-20 Thread Jochem Maas
Evert|Rooftop Solutions wrote: Hi, I have this piece of code: class test1 { var $data = 'hi', $node = false; function test1() { $this->node =& new test2($this); } } class test2 { var $data = 'yoyo',

[PHP] Classes, Constructors, References and Recursion

2005-04-20 Thread Evert | Rooftop Solutions
Hi, I have this piece of code: class test1 { var $data = 'hi', $node = false; function test1() { $this->node =& new test2($this); } } class test2 { var $data = 'yoyo', $root = false; fu

RE: [PHP] PHP Classes

2005-03-16 Thread Kim Madsen
-Original Message- From: Phil Neeb [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 8:58 PM > I've gone through the PHP Manual a few times now, reading about classes, > but really, what's written there doesn't make a whole lot of sense to > me. I know a lot, if not the vast ma

[PHP] PHP Classes

2005-03-16 Thread Phil Neeb
Greets, I've gone through the PHP Manual a few times now, reading about classes, but really, what's written there doesn't make a whole lot of sense to me. I know a lot, if not the vast majority, of PHP programmers use classes, so I was wondering if some of you could explain them to me. What ar

[PHP] Re: PHP Classes

2005-03-16 Thread Jason Barnett
You know... we talked about this several times before. Please search the archives for the PHP list's answers. Hint: STFA tutorial class object -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http:/

Re: [PHP] Classes code completion and Zend Studio

2005-03-14 Thread Zareef Ahmed
On Mon, 14 Mar 2005 23:30:51 +, Alister Bulman <[EMAIL PROTECTED]> wrote: > On Mon, 14 Mar 2005 19:14:37 +0530, Zareef Ahmed <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I have a function to load the classes and return the object. > > > > function LoadClass($ClassName) > > { > > require_once

Re: [PHP] Classes code completion and Zend Studio

2005-03-14 Thread Zareef Ahmed
On Mon, 14 Mar 2005 09:03:00 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > I have a function to load the classes and return the object. > > > > function LoadClass($ClassName) > > { > > require_once("Class.$ClassName.inc"); > > return new $ClassName(); > > } > > > >

Re: [PHP] Classes code completion and Zend Studio

2005-03-14 Thread Richard Lynch
> Hi All, > > I have a function to load the classes and return the object. > > function LoadClass($ClassName) > { > require_once("Class.$ClassName.inc"); > return new $ClassName(); > } > > Its working fine. > > But Zend Studio's Code completion is not working for this type of > object, Any hints?

[PHP] Classes code completion and Zend Studio

2005-03-14 Thread Zareef Ahmed
Hi All, I have a function to load the classes and return the object. function LoadClass($ClassName) { require_once("Class.$ClassName.inc"); return new $ClassName(); } Its working fine. But Zend Studio's Code completion is not working for this type of object, Any hints? Zareef Ahmed -- PHP

Re: [PHP] Classes and parents.

2005-01-24 Thread Richard Lynch
Dmitry wrote: > Greetings. > > If i run this code (php5): > -- > class a { > function say() { echo "A"; } > function run() { $this->say(); } > } > class b extends a { //> function say() { echo "B"; } function say() { parent::say(); echo "B";} > func

Re: [PHP] Classes and parents.

2005-01-21 Thread Jochem Maas
had to better myself... Jochem Maas wrote: Dmitry wrote: Greetings. If i run this code (php5): -- class a { function say() { echo "A"; } function run() { $this->say(); } } class b extends a { function say() { echo "B"; } function run() { parent::run(); }

  1   2   3   >