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

Source for file Administration.php

Documentation is available at Administration.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: 601 $  $Date: 2007-02-24 23:49:30 +0100 (Sa, 24 Feb 2007) $
  11.  * @package Phundament.Components
  12.  * @subpackage Pages
  13.  */
  14.  
  15. /**
  16.  * Displays lithrons main configuration options
  17.  *
  18.  * @package Admin.Pages
  19.  * @subpackage Main
  20.  */
  21.  
  22. class Administration extends TPage
  23. {
  24.  
  25.     /**
  26.      * Updates 'Globalization' settings
  27.      */
  28.     function updateCulture($sender$param)
  29.     {
  30.         $c$this->CultureSelector->getText();
  31.         $this->Application->Session->add("Culture"$c);
  32.         $this->getApplication()->getGlobalization()->Culture$c;
  33.         Prado :: trace("Culture set to " $c"Lithron.Main");
  34.         $this->Service->reload();
  35.     }
  36.  
  37.     /**
  38.      * deletes cache files from the runtime folder
  39.      */
  40.     function deleteRuntimeCache($sender$param)
  41.     {
  42.         $sel $this->RuntimeCacheSelector->getSelectedIndices();
  43.         if (count($sel== 0)
  44.         {
  45.             Prado :: trace("No runtime files selected. Nothing deleted.""Lithron.Main");
  46.             return;
  47.         }
  48.         $ds $this->RuntimeCacheSelector->getItems();
  49.         $rp $this->Application->getRuntimePath();
  50.         foreach($sel as $index)
  51.         {
  52.             // TODO: Windows filepath separator?
  53.             $filename $rp."/".$ds[$index]->getValue();
  54.             $result unlink($filename);
  55.             Prado :: trace("Deleting $filename($result "ok" "failed")"Lithron.Main");
  56.         }
  57.     }
  58.  
  59.  
  60.  
  61.  
  62. }
  63. ?>

Documentation generated on Sun, 25 Feb 2007 16:09:05 +0100 by phpDocumentor 1.3.1