diff options
author | Daniel <darthdaniel85@gmail.com> | 2013-11-26 10:32:35 -0500 |
---|---|---|
committer | Daniel <darthdaniel85@gmail.com> | 2013-11-26 10:32:35 -0500 |
commit | 96957c384a549a5cf7ad9c0e330307cc362a1c09 (patch) | |
tree | 7d8c7166281517b3e56ae3399b4fef2ba3d5b354 /framework/Wsat/TWsatService.php | |
parent | 227ef973f923ec201a1ece197f6242b3248c66ae (diff) |
Adjusting to PRADO code style...
Diffstat (limited to 'framework/Wsat/TWsatService.php')
-rw-r--r-- | framework/Wsat/TWsatService.php | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/framework/Wsat/TWsatService.php b/framework/Wsat/TWsatService.php index f2d852ea..5aa86dbd 100644 --- a/framework/Wsat/TWsatService.php +++ b/framework/Wsat/TWsatService.php @@ -33,29 +33,33 @@ * * Warning: You should only use Wsat in development mode. */ -class TWsatService extends TPageService { +class TWsatService extends TPageService +{ private $_pass = ''; //----------------------------------------------------------------------------- - public function init($config) { - if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) { + public function init($config) + { + if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); - } - if (empty($this->_pass)) { + + if (empty($this->_pass)) throw new TConfigurationException("You need to specify the Password attribute."); - } + $this->setDefaultPage("TWsatHome"); $this->_startThemeManager(); parent::init($config); } - public function getBasePath() { + public function getBasePath() + { $basePath = Prado::getPathOfNamespace("System.Wsat.pages"); return realpath($basePath); } - private function _startThemeManager() { + private function _startThemeManager() + { $themeManager = new TThemeManager; $themeManager->BasePath = "System.Wsat.themes"; $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); @@ -65,14 +69,14 @@ class TWsatService extends TPageService { $this->setThemeManager($themeManager); } - public function getPassword() { + public function getPassword() + { return $this->_pass; } - public function setPassword($_pass) { + public function setPassword($_pass) + { $this->_pass = $_pass; } -} - -?> +}
\ No newline at end of file |