title: PHP - Best practice for passing in object into another class?
body: <p>Assume I have the following classes: <code>Attributes</code>, <code>Quote</code> given:</p>
  
  <pre><code>    class Attributes {
           private $attr1; 
  
           public function __construct($attr)
           {
                // implementation 
           }
  
     }
  
     class Quote {
         private $obj;
  
         public function __construct($id, $obj)
         {
             $this-&gt;obj = $obj;  
             var_dump($this-&gt;obj); 
         }
     }
  </code></pre>
  
  <p>Can I therefore, somehow, pass in the object to the constructor for <code>Quote</code>, like this:</p>
  
  <pre><code>$attr = new Attributes("1");
  $quote = new Quote(1, $attr);
  </code></pre>
  
  <p>Doing this, just gives me a blank page?</p>