コード例 #1
0
ファイル: pradolite.php プロジェクト: tejdeeps/tejcs.com
 public function startService($serviceID)
 {
     if (isset($this->_services[$serviceID])) {
         list($serviceClass, $initProperties, $configElement) = $this->_services[$serviceID];
         $service = Prado::createComponent($serviceClass);
         if (!$service instanceof IService) {
             throw new THttpException(500, 'application_service_invalid', $serviceClass);
         }
         if (!$service->getEnabled()) {
             throw new THttpException(500, 'application_service_unavailable', $serviceClass);
         }
         $service->setID($serviceID);
         $this->setService($service);
         foreach ($initProperties as $name => $value) {
             $service->setSubProperty($name, $value);
         }
         if ($configElement !== null) {
             $config = new TApplicationConfiguration();
             if ($this->getConfigurationType() == self::CONFIG_TYPE_PHP) {
                 $config->loadFromPhp($configElement, $this->getBasePath());
             } else {
                 $config->loadFromXml($configElement, $this->getBasePath());
             }
             $this->applyConfiguration($config, true);
         }
         $service->init($configElement);
     } else {
         throw new THttpException(500, 'application_service_unknown', $serviceID);
     }
 }
コード例 #2
0
 public function checkInputBDE($trackingId)
 {
     // load parameters
     $confFile = './protected/pages/components/timuxuser/config.xml';
     if (file_exists($confFile)) {
         $config = new TApplicationConfiguration();
         $config->loadFromFile($confFile);
         $param = new TMap();
         foreach ($config->getParameters() as $id => $parameter) {
             if (is_array($parameter)) {
                 $component = Prado::createComponent($parameter[0]);
                 foreach ($parameter[1] as $name => $value) {
                     $component->setSubProperty($name, $value);
                 }
                 $param->add($id, $component);
             } else {
                 $param->add($id, $parameter);
             }
         }
     } else {
         $param = Prado::getApplication()->getParameters();
     }
     $computation2 = $param['computation2'];
     if ($computation2 != '') {
         Prado::using('horux.pages.components.timuxuser.' . $computation2);
         if (class_exists($computation2)) {
             $extend = new $computation2();
             if ($extend) {
                 return $extend->checkInputBDE($trackingId);
             }
         }
     }
     return true;
 }
コード例 #3
0
ファイル: TPageService.php プロジェクト: tejdeeps/tejcs.com
 /**
  * Loads the configuration specific for application part
  * @param TXmlElement config xml element
  * @param string base path corresponding to this xml element
  */
 public function loadApplicationConfigurationFromXml($dom, $configPath)
 {
     $appConfig = new TApplicationConfiguration();
     $appConfig->loadFromXml($dom, $configPath);
     $this->_appConfigs[] = $appConfig;
 }
コード例 #4
0
ファイル: index.php プロジェクト: BackupTheBerlios/horux-svn
}
if (!is_writable($runtimePath)) {
    die("Please make sure that the directory {$runtimePath} is writable by Web server process.");
}
require_once $frameworkPath;
if (!file_exists('./protected/runtime/.installed')) {
    $app_conf = new TApplicationConfiguration();
    $app_conf->loadFromFile('./protected/pages/install/application.xml');
    $application = new TApplication('protected', true);
    $application->applyConfiguration($app_conf, true);
    $application->run();
} else {
    $session = new THttpSession();
    $session->open();
    $application = new TApplication('protected', true);
    $app_conf = new TApplicationConfiguration();
    $config_file = './protected/application_p.xml';
    if (SAAS) {
        $username = "";
        if (isset($_REQUEST['username'])) {
            $username = $_REQUEST['username'];
        } else {
            if (isset($_REQUEST['ctl0$Main$username'])) {
                $username = $_REQUEST['ctl0$Main$username'];
            }
        }
        if ($username !== "") {
            if (($pos = strpos($username, '@')) !== false) {
                $domain = strstr($username, '@');
                $user = substr($username, 0, $pos);
                $domain = substr($domain, 1, strlen($domain) - 1);