Assume I have the following classes: Attributes
, Quote
given:
class Attributes {
private $attr1;
public function __construct($attr)
{
// implementation
}
}
class Quote {
private $obj;
public function __construct($id, $obj)
{
$this->obj = $obj;
var_dump($this->obj);
}
}
Can I therefore, somehow, pass in the object to the constructor for Quote
, like this:
$attr = new Attributes("1");
$quote = new Quote(1, $attr);
Doing this, just gives me a blank page?