title: Class name dynamically in hasOne not working
body: <pre><code>public function getResource() {
   return $this-&gt;hasOne(User::className(), ['id' =&gt; 'resource_id']);
  }
  </code></pre>
  
  <p>this function working fine but when i use this</p>
  
  <pre><code>public function getResource() {
   $model = ucfirst($this-&gt;resource_type);
   return $this-&gt;hasOne($model::className(), ['id' =&gt; 'resource_id']);
  }
  </code></pre>
  
  <p>its give me error "Class 'User' not found".
  Thanks</p>