| 1 | <?php  | 
            ||
| 14 | class RedirectPreOutput extends Event  | 
            ||
| 15 | { | 
            ||
| 16 | const NAME = 'redirect.preoutput';  | 
            ||
| 17 | |||
| 18 | /** @var string */  | 
            ||
| 19 | private $fromUrl;  | 
            ||
| 20 | |||
| 21 | /** @var string */  | 
            ||
| 22 | private $toUrl;  | 
            ||
| 23 | |||
| 24 | /** @var BasePageView */  | 
            ||
| 25 | private $parentPageView;  | 
            ||
| 26 | |||
| 27 | /** @var BasePageView */  | 
            ||
| 28 | private $redirectPageView;  | 
            ||
| 29 | |||
| 30 | /**  | 
            ||
| 31 | * @param string $from  | 
            ||
| 32 | * @param string $to  | 
            ||
| 33 | * @param BasePageView $pageView  | 
            ||
| 34 | * @param BasePageView $redirectPageView  | 
            ||
| 35 | */  | 
            ||
| 36 | 2 | public function __construct($from, $to, $pageView, $redirectPageView)  | 
            |
| 43 | |||
| 44 | /**  | 
            ||
| 45 | * @return string  | 
            ||
| 46 | */  | 
            ||
| 47 | public function getFromUrl()  | 
            ||
| 51 | |||
| 52 | /**  | 
            ||
| 53 | * @return string  | 
            ||
| 54 | */  | 
            ||
| 55 | public function getToUrl()  | 
            ||
| 59 | |||
| 60 | /**  | 
            ||
| 61 | * Read-only access to the PageView who this redirect belongs to.  | 
            ||
| 62 | *  | 
            ||
| 63 | * @return BasePageView  | 
            ||
| 64 | */  | 
            ||
| 65 | public function getParentPageView()  | 
            ||
| 69 | |||
| 70 | /**  | 
            ||
| 71 | * The PageView that was generated to create this redirect as a flat file.  | 
            ||
| 72 | *  | 
            ||
| 73 | * @return BasePageView  | 
            ||
| 74 | */  | 
            ||
| 75 | public function getRedirectPageView()  | 
            ||
| 79 | }  | 
            ||
| 80 |