title: How to get variable from one class to another in Joomla?
body: <p>How do I get the <code>getState</code> variable from one class to another?</p>
  
  <p>Exactly I need to get value of "filter.search". How can I do that?</p>
  
  <pre><code>jimport('joomla.filesystem.folder');
  abstract class SroHelper 
  {
      public static function checkIP() 
      {
          SroModelItems::getState(filter.search); ---- ??
      }
  
  }
  
  jimport('joomla.application.component.model');
  class SroModelItems extends JModel 
  {
      protected function populateState($ordering = null, $direction = null) 
      {
          $this-&gt;setState("filter.search", $jform["search$dbextra"]);
      }
  }
  </code></pre>