summaryrefslogtreecommitdiff
path: root/framework/Wsat/TWsatService.php
diff options
context:
space:
mode:
authorDaniel <darthdaniel85@gmail.com>2013-11-30 02:58:02 -0500
committerDaniel <darthdaniel85@gmail.com>2013-11-30 02:58:02 -0500
commit22276c273cc158cf12fd7b63e581b08cdae7b6f1 (patch)
tree560010fd44ef36d686a0d16313d983b1da6d9acc /framework/Wsat/TWsatService.php
parent96957c384a549a5cf7ad9c0e330307cc362a1c09 (diff)
Adding Many To Many relationships support!
Diffstat (limited to 'framework/Wsat/TWsatService.php')
-rw-r--r--framework/Wsat/TWsatService.php69
1 files changed, 34 insertions, 35 deletions
diff --git a/framework/Wsat/TWsatService.php b/framework/Wsat/TWsatService.php
index 5aa86dbd..85b062e5 100644
--- a/framework/Wsat/TWsatService.php
+++ b/framework/Wsat/TWsatService.php
@@ -36,47 +36,46 @@
class TWsatService extends TPageService
{
- private $_pass = '';
+ private $_pass = '';
+
+ 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.");
-//-----------------------------------------------------------------------------
- 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))
+ throw new TConfigurationException("You need to specify the Password attribute.");
- if (empty($this->_pass))
- throw new TConfigurationException("You need to specify the Password attribute.");
+ $this->setDefaultPage("TWsatHome");
+ $this->_startThemeManager();
+ parent::init($config);
+ }
- $this->setDefaultPage("TWsatHome");
- $this->_startThemeManager();
- parent::init($config);
- }
+ public function getBasePath()
+ {
+ $basePath = Prado::getPathOfNamespace("System.Wsat.pages");
+ return realpath($basePath);
+ }
- public function getBasePath()
- {
- $basePath = Prado::getPathOfNamespace("System.Wsat.pages");
- return realpath($basePath);
- }
+ private function _startThemeManager()
+ {
+ $themeManager = new TThemeManager;
+ $themeManager->BasePath = "System.Wsat.themes";
+ $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat'));
+ $themeManager->BaseUrl = $url . "/themes";
- private function _startThemeManager()
- {
- $themeManager = new TThemeManager;
- $themeManager->BasePath = "System.Wsat.themes";
- $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat'));
- $themeManager->BaseUrl = $url . "/themes";
+ $themeManager->init(null);
+ $this->setThemeManager($themeManager);
+ }
- $themeManager->init(null);
- $this->setThemeManager($themeManager);
- }
+ public function getPassword()
+ {
+ return $this->_pass;
+ }
- public function getPassword()
- {
- return $this->_pass;
- }
-
- public function setPassword($_pass)
- {
- $this->_pass = $_pass;
- }
+ public function setPassword($_pass)
+ {
+ $this->_pass = $_pass;
+ }
} \ No newline at end of file