Parents constructor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a class B that extends class A. I want to call constructor of A
correctly, how to do that. This is how I tried:

Class B extends A {
	Function B($Bvariable) {
		Parent::A($Bvariable);
	}

}

Class A {
	Function A($Avariable) {
		Dostuff...
	}
}

It does not seem correct, maybe I am correct, but I do not feel correct.

/Peter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux