Re: [PHP] Class and subclass

2007-03-14 Thread Richard Lynch
I think you'd need to take this up with Zend if they are claiming it's invalid syntax when it is valid. If it's really not valid, I'm not seeing why, but what do I know? On Tue, March 13, 2007 4:18 am, Alain Roger wrote: > Hi Richard, > > In fact the problem is that under Zend Studio editor, when

Re: [PHP] Class and subclass

2007-03-13 Thread Stut
Alain Roger wrote: In fact the problem is that under Zend Studio editor, when i typed : $this->class_A_property->Class_B_method did not appear as valid. if i typed $this->class_A_property , this was valid because $this refered to Class_A. but if you define a property (private $myobject_B) in c

Re: [PHP] Class and subclass

2007-03-13 Thread Jim Lucas
Alain Roger wrote: Hi Richard, In fact the problem is that under Zend Studio editor, when i typed : $this->class_A_property->Class_B_method did not appear as valid. if i typed $this->class_A_property , this was valid because $this refered to Class_A. but if you define a property (private $myo

Re: [PHP] Class and subclass

2007-03-13 Thread Alain Roger
Hi Richard, In fact the problem is that under Zend Studio editor, when i typed : $this->class_A_property->Class_B_method did not appear as valid. if i typed $this->class_A_property , this was valid because $this refered to Class_A. but if you define a property (private $myobject_B) in class A, a

Re: [PHP] Class and subclass

2007-03-12 Thread Richard Lynch
I think he's claiming that if you typed it correctly, it should work. You haven't told us anything about the "not working" part... var_dump $this->myotherclass and see what's in it. On Wed, March 7, 2007 8:45 am, Alain Roger wrote: > Yes, for sure. > > On 3/7/07, Tijnema ! <[EMAIL PROTECTED]> wr

Re: [PHP] Class and subclass

2007-03-08 Thread Stut
Please include the list in replies. Budi Setiawan wrote: I suggest you read up on classes and the syntax thereof in the manual - you're not getting it at the moment. Remember, PHP is not C++. what does that mean? It means... 1) Read the manual: http://php.net/oop5 2) PHP is not C++ I hope

Re: [PHP] Class and subclass

2007-03-07 Thread Stut
Alain Roger wrote: i have a class A with some properties. i have a class B with several public functions (i.e : Render()) i would like to do something like that : class B() { B() { } public function Render() { ... } } class A { private $myotherclass; A() { $this->myotherclass = new classB(

Re: [PHP] Class and subclass

2007-03-07 Thread Jochem Maas
$> php -r ' class A { function render() { echo "foo\n"; } } class B { function __construct() { $this->a = new A; } function test() { $this->a->render(); } } $b = new B; $b->test(); ' foo ... works for me. Alain Roger wrote: > Hi, > > i have a class A with some properties. > i have a class

Re: [PHP] Class and subclass

2007-03-07 Thread Robert Cummings
On Wed, 2007-03-07 at 14:31 +0100, Alain Roger wrote: > A() or B() mean constructors of th class A and B respectively. Obviously, but you appear to have declared them incorrectly by not including the "function" keyword. Cheers, Rob. -- .---

Re: [PHP] Class and subclass

2007-03-07 Thread Alain Roger
Yes, for sure. On 3/7/07, Tijnema ! <[EMAIL PROTECTED]> wrote: On 3/7/07, Alain Roger <[EMAIL PROTECTED]> wrote: > > A() or B() mean constructors of th class A and B respectively. > > Al. Yes but they are functions. On 3/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Wed, 2007

Re: [PHP] Class and subclass

2007-03-07 Thread Tijnema !
On 3/7/07, Alain Roger <[EMAIL PROTECTED]> wrote: A() or B() mean constructors of th class A and B respectively. Al. Yes but they are functions. On 3/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-03-07 at 14:23 +0100, Alain Roger wrote: > > Hi, > > > > i have a class A

Re: [PHP] Class and subclass

2007-03-07 Thread Alain Roger
A() or B() mean constructors of th class A and B respectively. Al. On 3/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-03-07 at 14:23 +0100, Alain Roger wrote: > Hi, > > i have a class A with some properties. > i have a class B with several public functions (i.e : Render()) > >

Re: [PHP] Class and subclass

2007-03-07 Thread Robert Cummings
On Wed, 2007-03-07 at 14:23 +0100, Alain Roger wrote: > Hi, > > i have a class A with some properties. > i have a class B with several public functions (i.e : Render()) > > i would like to do something like that : > > class B() > { > B() I'm pretty sure you mean "function B()" or in PHP 5 "fun

[PHP] Class and subclass

2007-03-07 Thread Alain Roger
Hi, i have a class A with some properties. i have a class B with several public functions (i.e : Render()) i would like to do something like that : class B() { B() { } public function Render() { ... } } class A { private $myotherclass; A() { $this->myotherclass = new classB(); } public fu