title: CodeIgniter call function within the same class
body: <p>I am trying to do this code in my CodeIgniter application :</p>
  
  <pre><code>&lt;?php
    class Inventory extends Controller {
  
      function current_stock()
      {
        //do something
      }
  
      function add_stock()
      {
        //do something-else
        ****then do function current_stock()*****
  
      }
  
    }
  </code></pre>
  
  <p>How do I execute another function from within a second one?
  The approach outlined <a href="http://philsturgeon.co.uk/news/2010/02/CodeIgniter-Base-Classes-Keeping-it-DRY" rel="nofollow noreferrer">here</a> (about extending controllers) is something of an overkill for me.</p>
  
  <p>Am I missing a much easier way?</p>