Magento – Get current module name, route name, controller name and action name

Some  time we need to get current controller name  or action name or module name. Its very easy  to get “ROUTE NAME”, “MODULE NAME”, “CONTROLLER NAME” and “ACTION NAME”  for MAGENTO from “CURRENT URL” anywhere in magento.

<?php

Mage::app()->getRequest()->getControllerName(); //for get Controller name.

Mage::app()->getRequest()->getActionName(); // for get action name

Mage::app()->getRequest()->getRouteName(); //for get routes name

Mage::app()->getRequest()->getModuleName(); // for get module name

?>