RedirectToView.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2006-2007 by Konstantin V. Arkhipov                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 /* $Id: RedirectToView.class.php 4687 2007-12-09 18:57:18Z voxus $ */
00012 
00016     final class RedirectToView extends RedirectView
00017     {
00018         private $prefix = null;
00019         private $suffix = null;
00020         
00024         public static function create($controllerName)
00025         {
00026             return new self($controllerName);
00027         }
00028         
00029         public function __construct($controllerName)
00030         {
00031             Assert::isTrue(
00032                 class_exists($controllerName, true)
00033             );
00034             
00035             $this->url = $controllerName;
00036         }
00037         
00038         public function getPrefix()
00039         {
00040             return $this->prefix;
00041         }
00042         
00046         public function setPrefix($prefix)
00047         {
00048             $this->prefix = $prefix;
00049             
00050             return $this;
00051         }
00052         
00053         public function getSuffix()
00054         {
00055             return $this->suffix;
00056         }
00057         
00061         public function setSuffix($suffix)
00062         {
00063             $this->suffix = $suffix;
00064             
00065             return $this;
00066         }
00067         
00068         public function getName()
00069         {
00070             return $this->url;
00071         }
00072         
00076         public function setName($name)
00077         {
00078             $this->url = $name;
00079             
00080             return $this;
00081         }
00082         
00083         public function getUrl()
00084         {
00085             return $this->prefix.$this->url.$this->suffix;
00086         }
00087     }
00088 ?>

Generated on Sun Dec 9 21:56:24 2007 for onPHP by  doxygen 1.5.4