[PHP] PHP class question

2009-05-21 Thread Peter van der Does
I have the following situation. I wrote some software and split it up into functionality: class core { function go{ } } class A extends core { // PHP4 constructor function A { $this-go(); } } class B extends core { } In core I define functions and variables that are to be used

[PHP] Re: PHP class question

2009-05-21 Thread Nathan Rixham
Peter van der Does wrote: I have the following situation. I wrote some software and split it up into functionality: class core { function go{ } } class A extends core { // PHP4 constructor function A { $this-go(); } } class B extends core { } In core I define functions and

[PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
Peter van der Does wrote: I have the following situation. I wrote some software and split it up into functionality: class core { function go{ } } class A extends core { // PHP4 constructor function A { $this-go(); } } class B extends core { } In core I

Re: [PHP] Re: PHP class question

2009-05-21 Thread Peter van der Does
On Thu, 21 May 2009 14:08:11 -0500 Shawn McKenzie nos...@mckenzies.net wrote: This doesn't make sense. You say class A needs to be extended with another class, however what you show below is class A extending framework_class. I worded it wrong, I apologize. Class A needs to be an

Re: [PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
Peter van der Does wrote: On Thu, 21 May 2009 14:08:11 -0500 Shawn McKenzie nos...@mckenzies.net wrote: This doesn't make sense. You say class A needs to be extended with another class, however what you show below is class A extending framework_class. I worded it wrong, I apologize.

Re: [PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
Shawn McKenzie wrote: Peter van der Does wrote: On Thu, 21 May 2009 14:08:11 -0500 Shawn McKenzie nos...@mckenzies.net wrote: This doesn't make sense. You say class A needs to be extended with another class, however what you show below is class A extending framework_class. I worded it

Re: [PHP] Re: PHP class question

2009-05-21 Thread Nathan Rixham
Shawn McKenzie wrote: Shawn McKenzie wrote: Peter van der Does wrote: On Thu, 21 May 2009 14:08:11 -0500 Shawn McKenzie nos...@mckenzies.net wrote: This doesn't make sense. You say class A needs to be extended with another class, however what you show below is class A extending

[PHP] Class question

2006-09-15 Thread Roger Helgesen
I have 3 classes, CLASS A,B and C class A { var $some_var; var $class_B; function A(){ $this-class_B = new B(); $this-some_var=2; } } class B { var $some_var; var $class_C; function B(){

Re: [PHP] Class question

2006-09-15 Thread Thomas Munz
Use 'extends' syntax for sub classes class A { var $some_var; var $class_B; function A(){ $this-class_B = new B(); $this-some_var=2; } } class B extends A { var $class_C; function B(){

Re: [PHP] Class question

2006-09-15 Thread Andrei
Well in this example it will get to an infinite loop, but anyway like Thomas said you must check into extending classes. Andy Thomas Munz wrote: Use 'extends' syntax for sub classes class A { var $some_var; var $class_B; function A(){

Re: [PHP] Class question

2006-09-15 Thread Roger Helgesen
What does $this-A(); do ?(in constructor of class B) does it make another instance of class A, and if not why do I have to parse vars to the A constructor ($this-A($var1,$var2))?. I dont think that is what I want. A can have many instances of B. B can have many instances of C.

[PHP] PHP - class question

2002-08-14 Thread Mark Armendariz
Hello, To begin.. i'm new to the list... I'm trying to learn good practices in OOP based PHP. I'm actually a bit new to OOP in general, but I've done quite a bit of reading and playing around with it in the past couple of months. What I'm trying to figure out is the proper way to call a class

RE: [PHP] PHP - class question

2002-08-14 Thread Steve Bradwell
PROTECTED]] Sent: Wednesday, August 14, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP - class question Hello, To begin.. i'm new to the list... I'm trying to learn good practices in OOP based PHP. I'm actually a bit new to OOP in general, but I've done quite a bit of reading and playing

Re: [PHP] PHP - class question

2002-08-14 Thread Nick Oostveen
If you are just trying to access a classes functions without creating an instance of it you're probably looking to use the scope resolution operator ::. For this to work all you have to do is ensure that the definition for the class you wish to use is included into the file containing the

Re: [PHP] PHP - class question

2002-08-14 Thread Mark Armendariz
ys reuse the method from other code. hth, Steve. -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP - class question Hello, To begin.. i'm new to the list... I'm trying to le

Re: [PHP] PHP - class question

2002-08-14 Thread Mark Armendariz
Do you know where I can find more info on how to use the scope resolution operator? My searches aren't giving much (at leant not mcuh regarding php) and in the manual, it only shows up momentarily as a note in the operators section... Mark Nick Oostveen [EMAIL PROTECTED] wrote in message

Re[2]: [PHP] PHP - class question

2002-08-14 Thread Tom Rogers
Hi, Thursday, August 15, 2002, 5:17:00 AM, you wrote: MA Well, I actually have a full db class which has a connect and close method MA as well as query, fetch_array, etc... What I really want to know is how to MA use the methods in my db class from another class (myclass for example).. MA Do I

[PHP] class question 2

2002-03-27 Thread Caspar Kennerdale
Sorry Another question- Do instances of classes remain in 'communication' with each other if declared my different functions in a case switch statement. At present I have an admin.php which is one long swtich statement. Wihin each is a list iof functions which created the elements of the page

RE: [PHP] class question 2

2002-03-27 Thread Rick Emery
] class question 2 Sorry Another question- Do instances of classes remain in 'communication' with each other if declared my different functions in a case switch statement. At present I have an admin.php which is one long swtich statement. Wihin each is a list iof functions which created

RE: [PHP] class question 2

2002-03-27 Thread Martin Towell
: Thursday, March 28, 2002 1:17 PM To: Php-General-List (E-mail) Subject: [PHP] class question 2 Sorry Another question- Do instances of classes remain in 'communication' with each other if declared my different functions in a case switch statement. At present I have an admin.php which is one

[PHP] Class question

2002-02-20 Thread Chris Boget
I'm still kind of new when it comes to dealing with classes. I'm curious, is it accepted practice for member functions of your class to: * access global variables * use non member, user defined functions Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Class question

2002-02-20 Thread Hunter, Ray
, then again you want to use objects. As for practice, it is up to you. For me, no... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 1:58 PM To: PHP General Subject: [PHP] Class question

Re: [PHP] Class question

2002-02-20 Thread Jeff Sheltren
Well, I guess many things are accepted now, but here's my two cents: I wouldn't access global variables, instead you should pass everything you need as parameters. Using global variables can come back to bite you occasionally because you may think you are changing a local variable at one

[PHP] Class Question

2001-06-21 Thread Unni
Hello, This is the first time I write OOP in PHP. I wrote a small class for Mysql and from the index.php, I am calling the new function. I have a display before new class and I have a display after the new and only the display I am getting is the before class and after that there is no error.