@@ -42,47 +42,47 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | class TWsatService extends TPageService |
| 44 | 44 | { |
| 45 | - const PAGE_NAMESPACE_PREFIX = 'Prado\\Wsat\\pages\\'; |
|
| 46 | - private $_pass = ''; |
|
| 45 | + const PAGE_NAMESPACE_PREFIX = 'Prado\\Wsat\\pages\\'; |
|
| 46 | + private $_pass = ''; |
|
| 47 | 47 | |
| 48 | - public function init($config) |
|
| 49 | - { |
|
| 50 | - if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) |
|
| 51 | - throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); |
|
| 48 | + public function init($config) |
|
| 49 | + { |
|
| 50 | + if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) |
|
| 51 | + throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); |
|
| 52 | 52 | |
| 53 | - if (empty($this->_pass)) |
|
| 54 | - throw new TConfigurationException("You need to specify the Password attribute."); |
|
| 53 | + if (empty($this->_pass)) |
|
| 54 | + throw new TConfigurationException("You need to specify the Password attribute."); |
|
| 55 | 55 | |
| 56 | - $this->setDefaultPage("TWsatHome"); |
|
| 57 | - $this->_startThemeManager(); |
|
| 58 | - parent::init($config); |
|
| 59 | - } |
|
| 56 | + $this->setDefaultPage("TWsatHome"); |
|
| 57 | + $this->_startThemeManager(); |
|
| 58 | + parent::init($config); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - public function getBasePath() |
|
| 62 | - { |
|
| 63 | - $basePath = Prado::getPathOfNamespace("System.Wsat.pages"); |
|
| 64 | - return realpath($basePath); |
|
| 65 | - } |
|
| 61 | + public function getBasePath() |
|
| 62 | + { |
|
| 63 | + $basePath = Prado::getPathOfNamespace("System.Wsat.pages"); |
|
| 64 | + return realpath($basePath); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - private function _startThemeManager() |
|
| 68 | - { |
|
| 69 | - $themeManager = new TThemeManager; |
|
| 70 | - $themeManager->BasePath = "System.Wsat.themes"; |
|
| 71 | - $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); |
|
| 72 | - $themeManager->BaseUrl = "$url/themes"; |
|
| 67 | + private function _startThemeManager() |
|
| 68 | + { |
|
| 69 | + $themeManager = new TThemeManager; |
|
| 70 | + $themeManager->BasePath = "System.Wsat.themes"; |
|
| 71 | + $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); |
|
| 72 | + $themeManager->BaseUrl = "$url/themes"; |
|
| 73 | 73 | |
| 74 | - $themeManager->init(null); |
|
| 75 | - $this->setThemeManager($themeManager); |
|
| 76 | - } |
|
| 74 | + $themeManager->init(null); |
|
| 75 | + $this->setThemeManager($themeManager); |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | - public function getPassword() |
|
| 79 | - { |
|
| 80 | - return $this->_pass; |
|
| 81 | - } |
|
| 78 | + public function getPassword() |
|
| 79 | + { |
|
| 80 | + return $this->_pass; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - public function setPassword($_pass) |
|
| 84 | - { |
|
| 85 | - $this->_pass = $_pass; |
|
| 86 | - } |
|
| 83 | + public function setPassword($_pass) |
|
| 84 | + { |
|
| 85 | + $this->_pass = $_pass; |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | 88 | } |
| 89 | 89 | \ No newline at end of file |
@@ -42,15 +42,15 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | class TWsatService extends TPageService |
| 44 | 44 | { |
| 45 | - const PAGE_NAMESPACE_PREFIX = 'Prado\\Wsat\\pages\\'; |
|
| 46 | - private $_pass = ''; |
|
| 45 | + const PAGE_NAMESPACE_PREFIX='Prado\\Wsat\\pages\\'; |
|
| 46 | + private $_pass=''; |
|
| 47 | 47 | |
| 48 | 48 | public function init($config) |
| 49 | 49 | { |
| 50 | - if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) |
|
| 50 | + if($this->getApplication()->getMode()===TApplicationMode::Performance || $this->getApplication()->getMode()===TApplicationMode::Normal) |
|
| 51 | 51 | throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); |
| 52 | 52 | |
| 53 | - if (empty($this->_pass)) |
|
| 53 | + if(empty($this->_pass)) |
|
| 54 | 54 | throw new TConfigurationException("You need to specify the Password attribute."); |
| 55 | 55 | |
| 56 | 56 | $this->setDefaultPage("TWsatHome"); |
@@ -60,16 +60,16 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function getBasePath() |
| 62 | 62 | { |
| 63 | - $basePath = Prado::getPathOfNamespace("System.Wsat.pages"); |
|
| 63 | + $basePath=Prado::getPathOfNamespace("System.Wsat.pages"); |
|
| 64 | 64 | return realpath($basePath); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | private function _startThemeManager() |
| 68 | 68 | { |
| 69 | - $themeManager = new TThemeManager; |
|
| 70 | - $themeManager->BasePath = "System.Wsat.themes"; |
|
| 71 | - $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); |
|
| 72 | - $themeManager->BaseUrl = "$url/themes"; |
|
| 69 | + $themeManager=new TThemeManager; |
|
| 70 | + $themeManager->BasePath="System.Wsat.themes"; |
|
| 71 | + $url=Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); |
|
| 72 | + $themeManager->BaseUrl="$url/themes"; |
|
| 73 | 73 | |
| 74 | 74 | $themeManager->init(null); |
| 75 | 75 | $this->setThemeManager($themeManager); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | public function setPassword($_pass) |
| 84 | 84 | { |
| 85 | - $this->_pass = $_pass; |
|
| 85 | + $this->_pass=$_pass; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | } |
| 89 | 89 | \ No newline at end of file |