title: How to add a global constant to the application?
body: <p>I want to add an application constant like <code>YII_DEBUG</code>. I found that it should be defined in YiiBase class. But I don't know what is the best way to do so.</p>
  <p>This is what the Yii documentation says</p>
  <blockquote>
  <p>Yii is a helper class serving common framework functionalities.</p>
  <p>It encapsulates YiiBase which provides the actual implementation. By writing your own Yii class, you can customize some functionalities of YiiBase.</p>
  </blockquote>
  <p>How should I write my own Yii class, where should I put it and where should I call it?</p>