title: What is the usage of property in Codeigniter Model Class?
body: <p>I copied following code from <a href="https://www.codeigniter.com/userguide3/general/models.html" rel="nofollow noreferrer">official Codeigniter documentation</a>.</p>
  
  <pre><code>class Blog_model extends CI_Model {
  
          public $title;
          public $content;
          public $date;
  
          public function get_last_ten_entries()
          {
                  $query = $this-&gt;db-&gt;get('entries', 10);
                  return $query-&gt;result();
          }
  
          public function insert_entry()
          {
                  $this-&gt;title    = $_POST['title']; // please read the below note
                  $this-&gt;content  = $_POST['content'];
                  $this-&gt;date     = time();
  
                  $this-&gt;db-&gt;insert('entries', $this);
          }
  
          public function update_entry()
          {
                  $this-&gt;title    = $_POST['title'];
                  $this-&gt;content  = $_POST['content'];
                  $this-&gt;date     = time();
  
                  $this-&gt;db-&gt;update('entries', $this, array('id' =&gt; $_POST['id']));
          }
  
  }
  </code></pre>
  
  <p>Please check line 3-5 : There are three property called <code>public $title;      public $content;public $date;</code>.</p>
  
  <p>What is the usage of them? </p>
  
  <p>I asked this question because this codes works fine even when removing them.</p>
  
  <p>I have tested it removing those there properties. Still I can call <code>get_last_ten_entries()</code>, <code>insert_entry()</code>, <code>update_entry()</code> function from Controller without issue.</p>