title: Yii2 strange errorException on call Yii::$app->
body: <p>I'm implementing an yii2 module for handle slider inside my application, the base structur of project is yii2 advance template.
  I've a class Images wich extends another model class generated by gii,
  Images.php</p>
  
  <pre><code>&lt;?php
  
   namespace common\modules\sliders\models;
  
   use Yii;
   use common\modules\sliders\models\base\Images as Im;
  
   /**
    * This is the model class for table "images".
    *
    */
   class Images extends Im
   {
      const UPLOAD_URL = Yii::$app-&gt;getModule('sliders');
   }
  </code></pre>
  
  <p>the costant UPLOAD_URL would be the path where I'll upload my images and this value is stored in the configuration params of my module, so that is more simple configuring the module for use in another application.
  When I create an instance of my Images object the strange error I receive is: </p>
  
  <blockquote>
    <p>syntax error, unexpected '$app' (T_VARIABLE), expecting identifier (T_STRING) or class (T_CLASS)</p>
  </blockquote>
  
  <p>which interest this line:</p>
  
  <pre><code>const UPLOAD_URL = Yii::$app-&gt;getModule('sliders');
  </code></pre>
  
  <p>Why this?</p>
  
  <p>P.s.: I know that UPLOAD_URL in this way don't take the values of configurations params but I'm stopped by the error.</p>
  
  <p>Thanks.</p>