Phundament-Components
[ class tree: Phundament-Components ] [ index: Phundament-Components ] [ all elements ]

Source for file LUrlKeeper.php

Documentation is available at LUrlKeeper.php

  1. <?php
  2.  
  3.  
  4. /**
  5.  * Class file.
  6.  *
  7.  * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  8.  * @copyright 2005, diemeisterei GmbH. All rights reserved.
  9.  * @author $Author: schmunk $
  10.  * @version $Revision: 1 $  $Date: 2006-06-01 15:11:24 +0000 (Do, 01 Jun 2006) $
  11.  * @package Phundament.Components
  12.  * @subpackage Modules
  13.  */
  14.  
  15. /**
  16.  * class
  17.  *
  18.  * @package System.Util
  19.  * @subpackage Modules
  20.  */
  21. class LUrlKeeper extends TModule
  22. {
  23.  
  24.     public function init($config)
  25.     {
  26.         parent :: init($config);
  27.  
  28.         #echo $this->Request->RequestUri;
  29.         $culture$config->getElementByTagName("culture");
  30.         $pattern$culture->getAttribute("pattern");
  31.         $param$culture->getAttribute("param");
  32.  
  33.         $url$this->Request-> $param;
  34.         preg_match($pattern$url$match);
  35.  
  36.         #var_dump($match);
  37.         if (isset ($match[1]))
  38.         {
  39.             if ($this->Application->Globalization->Culture != $match[1])
  40.             {
  41.                 Prado :: log("Switching culture to '" $match[1"'"TLogger :: DEBUG"Lithron.LUrlKeeper");
  42.                 $this->Session['Culture']$match[1];
  43.                 $this->getApplication()->getGlobalization()->Culture$match[1];
  44.             }
  45.         }
  46.  
  47.         if (isset ($match[2]))
  48.         {
  49.             #echo "x:".$match[2];
  50.             if ($match[2== "INT")
  51.             {
  52.                 $this->Session['LGeoIP_OverrideIp']"127.0.0.1";
  53.                 Prado :: log("Using GeoIp for INT"TLogger :: DEBUG"Lithron.LUrlKeeper");
  54.                 #$this->Application->getModule('geo_ip')->init(null);
  55.             }
  56.         }
  57.  
  58.     }
  59. }
  60. ?>

Documentation generated on Sun, 25 Feb 2007 16:11:48 +0100 by phpDocumentor 1.3.1