title: Returns the static model of the specified AR class in yii 2.0
body: <p>i want to build blog application using YII 2, i use the tbl_lookup table to store the mapping between integer values and textual representations that are needed by other data objects. i modify the Lookup model class as follows to more easily access the textual data in the table. here my code :</p>
  
  <pre><code>&lt;?php
    namespace common\models;
    use Yii;
  ?&gt;
  
  class Lookup extends \yii\db\ActiveRecord
  {
  private static $_items=array();
  
  public static function tableName()
  {
      return '{{%lookup}}';
  }   
  
  public static function model($className=__CLASS__)
  {
      return parent::model($className);
  }
  
      /**
   * @inheritdoc
   */
  public function rules()
  {
      return [
          [['name', 'code', 'type', 'position'], 'required'],
          [['code', 'position'], 'integer'],
          [['name', 'type'], 'string', 'max' =&gt; 128]
      ];
  }
  
  /**
   * @inheritdoc
   */
  public function attributeLabels()
  {
      return [
          'id' =&gt; 'ID',
          'name' =&gt; 'Name',
          'code' =&gt; 'Code',
          'type' =&gt; 'Type',
          'position' =&gt; 'Position',
      ];
  }
  
  private static function loadItems($type)
  {
      self::$_items[$type]=[];
      $models=self::model()-&gt;findAll([
          'condition'=&gt;'type=:$type',
          'params'=&gt;[':type'=&gt;$type],
          'order'=&gt;'position',
      ]);
  
      foreach ($models as $model)
          self::$_items[$type][$model-&gt;code]=$model-&gt;name;
  }
  
  public static function items($type)
  {
      if(!isset(self::$_items[$type]))
          self::loadItems($type);
      return self::$_items[$type];
  }
  
  public static function item($type, $code)
  {
      if(!isset(self::$_items[$type]))
          self::loadItems ($type);
      return isset(self::$_items[$type][$code]) ? self::$_items[$type][$code] : false;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>but i get some error when i want to return the static model class</p>
  
  <pre><code>public static function model($className=__CLASS__)
  {
      return parent::model($className);
  }
  </code></pre>
  
  <p>does anyone to help me ? where's my mistake.
  or anyone here have some tutorial to make blog application using yii 2 ?
  thank you.</p>