title: How to create an observer in magento
body: <p>I have created a custom module and when it's  controller called i want to make an observer to extend functionality.
  suppose my controller is :- </p>
  
  <pre><code>  &lt;?php
      class Test_Mod_IndexController extends Mage_Core_Controller_Front_Action
      {
          public function saveAction()
       {
            // code 
     $dataval =  $this-&gt;getRequest()-&gt;getParams();
      Mage::dispatchEvent('my_custom_event', $dataval);
        }
      }
  </code></pre>
  
  <p>Here is config file:- </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
    &lt;modules&gt;
      &lt;Myobs_Obser&gt;
        &lt;version&gt;0.1.0&lt;/version&gt;
      &lt;/Myobs_Obser&gt;
    &lt;/modules&gt;
      &lt;global&gt;
          &lt;models&gt;
              &lt;obser&gt;
              &lt;class&gt;Myobs_Obser_Model&lt;/class&gt;
              &lt;/obser&gt;
          &lt;/models&gt;
      &lt;/global&gt;
   &lt;frontend&gt;
      &lt;events&gt;
          &lt;my_custom_event&gt;
              &lt;observers&gt;
                  &lt;Myobs_Obser_my_custom_event_observer&gt;
                      &lt;type&gt;singleton&lt;/type&gt;
                      &lt;class&gt;obser/observer&lt;/class&gt;
                      &lt;method&gt;my_custom_method&lt;/method&gt;
                  &lt;/Myobs_Obser_my_custom_event_observer&gt;
              &lt;/observers&gt;
          &lt;/my_custom_event&gt;
      &lt;/events&gt;
  &lt;/frontend&gt;
  &lt;/config&gt; 
  </code></pre>
  
  <p>Here is observer :-</p>
  
  <pre><code>&lt;?php
  class Myobs_Obser_Model_Observer
  {
   public function my_custom_method($observer)
      {       
          $event = $observer-&gt;getEvent();  
                          var_dump($event);
          die;
         }
   }
  ?&gt;
  </code></pre>
  
  <p>It's not working please help me.
  Thanks.</p>