Connecting Tech Pros Worldwide Forums | Help | Site Map

syntax? how to declare a member of a class which is itself a class

D_a_n_i_e_l
Guest
 
Posts: n/a
#1: Aug 23 '07
how to declare a member of a class which is itself an object?

class cA
{
private $blah;
public function foo()
{
return blah;
}
}

class cB
{
private cA $a; // I want this to be of type class A
}


Closed Thread