当前位置: 首页>>代码示例>>PHP>>正文


PHP Prado::setApplication方法代码示例

本文整理汇总了PHP中Prado::setApplication方法的典型用法代码示例。如果您正苦于以下问题:PHP Prado::setApplication方法的具体用法?PHP Prado::setApplication怎么用?PHP Prado::setApplication使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Prado的用法示例。


在下文中一共展示了Prado::setApplication方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMysqlSqlMapManager

 protected function getMysqlSqlMapManager()
 {
     static $conn;
     static $sqlMapManager;
     if (Prado::getApplication() === null) {
         Prado::setApplication(new TApplication(dirname(__FILE__) . '/app'));
     }
     if ($conn === null) {
         $conn = new TDbConnection('mysql:host=localhost;dbname=prado_system_data_sqlmap', 'prado_unitest', 'prado_system_data_sqlmap_unitest');
     }
     $conn->setActive(true);
     if ($sqlMapManager === null) {
         $sqlMapManager = new TSqlMapManager($conn);
         $sqlMapManager->configureXml(dirname(__FILE__) . '/DynamicParameterTestMap.xml');
     }
     return $sqlMapManager;
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:17,代码来源:DynamicParameterTest.php

示例2: __construct

 public function __construct($basePath = 'protected', $cacheConfig = true, $configType = self::CONFIG_TYPE_XML)
 {
     Prado::setApplication($this);
     $this->setConfigurationType($configType);
     $this->resolvePaths($basePath);
     if ($cacheConfig) {
         $this->_cacheFile = $this->_runtimePath . DIRECTORY_SEPARATOR . self::CONFIGCACHE_FILE;
     }
     $this->_uniqueID = md5($this->_runtimePath);
     $this->_parameters = new TMap();
     $this->_services = array($this->getPageServiceID() => array('TPageService', array(), null));
     Prado::setPathOfAlias('Application', $this->_basePath);
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:13,代码来源:pradolite.php

示例3: __construct

 /**
  * Constructor.
  * Sets application base path and initializes the application singleton.
  * Application base path refers to the root directory storing application
  * data and code not directly accessible by Web users.
  * By default, the base path is assumed to be the <b>protected</b>
  * directory under the directory containing the current running script.
  * @param string application base path or configuration file path.
  *        If the parameter is a file, it is assumed to be the application
  *        configuration file, and the directory containing the file is treated
  *        as the application base path.
  *        If it is a directory, it is assumed to be the application base path,
  *        and within that directory, a file named <b>application.xml</b>
  *        will be looked for. If found, the file is considered as the application
  *        configuration file.
  * @param boolean whether to cache application configuration. Defaults to true.
  * @throws TConfigurationException if configuration file cannot be read or the runtime path is invalid.
  */
 public function __construct($basePath = 'protected', $cacheConfig = true)
 {
     // register application as a singleton
     Prado::setApplication($this);
     $this->resolvePaths($basePath);
     if ($cacheConfig) {
         $this->_cacheFile = $this->_runtimePath . DIRECTORY_SEPARATOR . self::CONFIGCACHE_FILE;
     }
     // generates unique ID by hashing the runtime path
     $this->_uniqueID = md5($this->_runtimePath);
     $this->_parameters = new TMap();
     $this->_services = array($this->getPageServiceID() => array('TPageService', array(), null));
     Prado::setPathOfAlias('Application', $this->_basePath);
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:32,代码来源:TApplication.php


注:本文中的Prado::setApplication方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。