title: codeigniter is returning database row considered oop
body: <p>im using Codeigniter 3.0 query builder, my question when ever my model return a user i'm returning a database row. not an object -its stdobject but not try object- is this anything related to oop practice ?</p>
  
  <p>my auth model is simple</p>
  
  <pre><code>class user extend CI_MODEL{
  
  funciton attempt($user,$pass){
  
  //do validation and fetch user and compare pass etc...
  
  $query = $this-&gt;db-&gt;get_where('users',$where);
  
  return $query-&gt;result() //now this is my line of question
  
  }
  
  }
  </code></pre>
  
  <p>so i think this is nothing related to oop ? -or am i wrong ? - its just procedural code using classes for organization !.</p>
  
  <p><strong>so what is the correct way in oop manner ?</strong></p>
  
  <p>I have goan through many auth libraries for codeigntier to see how they do it, and all what i see is they save user row to an array variable in model. yet all users are still inside only 1 user object .</p>
  
  <p>should i create an abstract class/interfaces for <code>user</code> object and pass database row to it every time i fetch a user before i save them to my Big ci_model  ?</p>
  
  <p>if so is this doable in codeigniter ? where would i put this abstract classes ?</p>