title: in yii how to get controller and action name ? showing error while calling from
body: <p>i have tried to access current controller and action name using following code , it works for the controller but failing in case of action name (code location: protected/components/controller.php)</p>
  
  <pre><code>class Controller extends CController
  {
  
      public $layout='//layouts/column1';
  
      public $menu=array();
  
      public $breadcrumbs=array();
          public function init()
          {
             echo Yii::app()-&gt;controller-&gt;id; // working fine
            echo Yii::app()-&gt;controller-&gt;action-&gt;id; exit; // showing error ![enter image description here][1]
  
          }
  }
  </code></pre>