title: Object Oriented Design: Return Values or Set Property?
body: <p>What would be considered "best practice" in this case. I've got a class that's gathering remote resources, and it looks a bit like this:</p>
  
  <pre><code>class Gather {
      public function getAll($locations) {
          $results = array('All','My','Results');
          return $results;
      }
  }
  </code></pre>
  
  <p>My question is, would it be considered a best practice to return the results, or to assign them as a property? ie.</p>
  
  <pre><code>// This
  $results = $gatherer-&gt;getAll();
  // vs This
  $gatherer-&gt;getAll(); // now $gatherer-&gt;results can be used
  </code></pre>
  
  <p>Its quite likely I'm just overthinking this, but I've got no formal training and I'm wondering if there's  "more correct" way of doing something like this.</p>