All pastes #163683 Raw Edit

Someone

public php v1 · immutable
·published 2006-09-07 19:41 UTC
rendered paste body
<?phperror_reporting(E_ALL);/** * Die Klasse SearchContoller kontrolliert die Suchfunktion. * * @author Christoph  */if (0 > version_compare(PHP_VERSION, '5')) {    die('This file was generated for PHP 5');}/** * Die Klasse BrowseView ist fr die Ansicht beim st&#65533;ern zust&#65533;dig. * * @author Christoph  */require_once('class.BrowseView.php');/** * Die Klasse Controller ist die Elternklasse aller Controller * Searchcontroller) in der Controller Schicht. Jede dieser Controller Klassen * von der abstrakten Controller Klasse und implementiert die Methoden * object und handleEvent(event: string):void. getInstance gibt eine * des Controller Objektes zurck. handleEvent ist fr die Verarbeitung von * zust&#65533;dig und entscheidet welche View als Ergebnis verwendet wird. * * @author Christoph  */require_once('class.Controller.php');/** * Die Klasse SearchView ist fr die Ansicht der Suchmaske zus&#65533;dig. * * @author Christoph  */require_once('class.SearchView.php');/* user defined includes */// section .:0000000000000BFF-includes begin// section .:0000000000000BFF-includes end/* user defined constants */// section .:0000000000000BFF-constants begin// section .:0000000000000BFF-constants end/** * Die Klasse SearchContoller kontrolliert die Suchfunktion. * * @access public * @author Christoph  */class SearchController    extends Controller{    // --- ATTRIBUTES ---    /**     * Attribut der Klasse SearchContoller     *     * @access protected     * @var object     */    protected static $m_controller = null;    // --- OPERATIONS ---    /**     * Gibt eine Referenz des SearchController Objektes zurck     *     * @access public     * @author firstname and lastname of author, <author@example.org>     * @return java_lang_Object     */    public static function getInstance()    {        $returnValue = null;        // section .:0000000000000BF7 begin        if (!isset (self :: $m_controller))			self::$m_controller = new SearchController();		$returnValue = self :: $m_controller;        // section .:0000000000000BF7 end        return $returnValue;    }    /**     * Ist fr die Verarbeitung von Ereignissen zust&#65533;dig, welche sich auf die     * beziehen     *     * @access public     * @author firstname and lastname of author, <author@example.org>     * @param string     * @return void     */    public function handleEvent($event)    {        // section .:0000000000000BFB begin                //berprft das event und fhrt zur richtigen funktion        switch ($event) {			case 'search' :			        print_r($_REQUEST);				// Output: Array ( [action] => search [description] => TEST [price] => ) 						$view = new SearchView($_REQUEST);				break;			case 'search_form' :				include ('templates/search_form.php');				break;			case 'browse' :			default :				$view = new BrowseView();				break;		}		if (isset ($view))			$view->display();        // section .:0000000000000BFB end    }    /**     * Erzeugt einen Standart Konstruktor     *     * @access protected     * @author firstname and lastname of author, <author@example.org>     * @return void     */    protected function __construct()    {        // section .:0000000000000BFE begin        parent:: __construct();        // section .:0000000000000BFE end    }} ?>