title: How to access private class's property from public static method in PHP
body: <p>I have a class (yii2 widget) that has private properties and public static functions. When I try to access a private property from the static method like <code>$this-&gt;MyPrivateVar</code> an error is generated regarding that I don't have to use <code>$this</code> in non object context! The following is a snippet of my code:</p>
  
  <pre><code>class JuiThemeSelectWidget extends Widget
  {
    private $list;
    private $script;
    private $juiThemeSelectId = 'AASDD5';
    public $label;
    ....
   public static function createSelectList($items)
    {
      $t = $this-&gt;juiThemeSelectId;
      ...
    }
  </code></pre>
  
  <p>I tried the following, but it seems that undergoes to infinite loop <code>Maximum execution time of 50 seconds exceeded</code>!</p>
  
  <pre><code>public static function createSelectList($items)
    {
      $t = new JuiThemeSelectWidget;
      $juiThemeSelectId = $t-&gt;juiThemeSelectId;
      ...
    }
  </code></pre>
  
  <p>So how could I access the private <code>juiThemeSelectId</code> from the static method?</p>