Redirector.php

00001 <?php
00012 class Dsao_Controller_Action_Helper_Redirector
00013   extends Zend_Controller_Action_Helper_Redirector
00014 {
00021   protected function _redirect($uri)
00022   {
00023     // Falls kein Objekt übergeben wurde
00024     if (!$uri instanceof Dsao_Uri_Http)
00025     {
00026       $uri = new Dsao_Uri_Http($uri);
00027     }
00028 
00029     // Token anhängen
00030     parent::_redirect($uri->getUriString(true, true));
00031 
00032     // ggf. beenden
00033     if ($this->getExit())
00034     {
00035       $this->redirectAndExit();
00036     }
00037   }
00038 
00048   public function gotoSimple($action, $controller = null, $module = null, array $parameters = array())
00049   {
00050     // Ggf. aktuelle Werte setzen
00051     $controller = ($controller ? $controller :
00052       $this->getRequest()->getControllerName());
00053 
00054     $module = ($module ? $module : $this->getRequest()->getModuleName());
00055 
00056     // URI erstellen
00057     $uri = new Dsao_Uri_Http('/'.$module.'/'.$controller.'/'.$action,
00058       $parameters);
00059 
00060     $this->_redirect($uri);
00061 
00062     return $this;
00063   }
00064 
00071   public function gotoUri(Dsao_Uri_Http $uri)
00072   {
00073     $this->_redirect($uri);
00074 
00075     return $this;
00076   }
00077 }

Erzeugt am Fri Sep 18 19:04:11 2009 für DSA online - Morgendaemmerung von  doxygen 1.5.7.1