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


PHP jApp::setCoord方法代码示例

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


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

示例1: initClassicRequest

 /**
  * initialize a full jelix environment with a coordinator, a request object etc.
  *
  * it initializes a coordinator, a classic request object. It sets jApp::coord(),
  * @param string $url the full requested URL (with http://, the domaine name etc.)
  * @param string $config the configuration file to use, as if you were inside an entry point
  * @param string $entryPoint the entrypoint name as indicated into project.xml
  */
 protected static function initClassicRequest($url, $config = 'index/config.ini.php', $entryPoint = 'index.php')
 {
     self::$fakeServer = new jelix\FakeServerConf\ApacheMod(jApp::wwwPath(), '/' . $entryPoint);
     self::$fakeServer->setHttpRequest($url);
     $config = jConfigCompiler::read($config, true, false, '/' . $entryPoint);
     $coord = new jCoordinatorForTest($config, false);
     jApp::setCoord($coord);
     $request = new jClassicRequest();
     $coord->testSetRequest($request);
 }
开发者ID:laurentj,项目名称:lizmap-web-client,代码行数:18,代码来源:junittestcase.class.php

示例2: checkAppOpened

<?php

/**
* @package   lizmap
* @subpackage admin
* @author    3liz
* @copyright 2011 3liz
* @link      http://3liz.com
* @license    Mozilla Public License : http://www.mozilla.org/MPL/
*/
require '../application.init.php';
require JELIX_LIB_CORE_PATH . 'request/jClassicRequest.class.php';
checkAppOpened();
// Charge la configuration
jApp::loadConfig('admin/config.ini.php');
// nouveau coordinateur, que l'on indique à jApp
jApp::setCoord(new jCoordinator());
// Nouvel objet request, que l'on passe au coordinateur, pour traiter le routage.
jApp::coord()->process(new jClassicRequest());
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:19,代码来源:admin.php

示例3: checkAppOpened

<?php

require_once '../application.init.php';
checkAppOpened();
jApp::loadConfig('soap/config.ini.php');
ini_set("soap.wsdl_cache_enabled", "0");
// disabling PHP's WSDL cache
$jelix = new jSoapCoordinator();
jApp::setCoord($jelix);
$jelix->request = new jSoapRequest();
$jelix->request->initService();
$jelix->processSoap();
开发者ID:jelix,项目名称:soap-server-module,代码行数:12,代码来源:soap.php

示例4: handleCustomTestSuite

 protected function handleCustomTestSuite()
 {
     $modulesTests = -1;
     /*
     $this->options[0] is an array of all options '--xxx'.
       each values is an array(0=>'optionname', 1=>'value if given')
     $this->options[1] is a list of parameters given after options
       it can be array(0=>'test name', 1=>'filename')
     */
     foreach ($this->options[0] as $option) {
         switch ($option[0]) {
             case '--entrypoint':
                 $this->entryPoint = $option[1];
                 break;
             case '--all-modules':
                 $modulesTests = 0;
                 break;
             case '--module':
                 $modulesTests = 1;
                 // test is the module name
                 // testFile is the test file inside the module
                 break;
             case '--testtype':
                 $this->testType = $option[1];
                 break;
         }
     }
     if (isset($this->options[1][1]) && $modulesTests != 0) {
         // a specifique test file
         $this->arguments['testFile'] = $this->options[1][1];
     } else {
         $this->arguments['testFile'] = '';
     }
     $appInstaller = new jInstallerApplication();
     $this->epInfo = $appInstaller->getEntryPointInfo($this->entryPoint);
     // let's load configuration now, and coordinator. it could be needed by tests
     // (during load of their php files or during execution)
     jApp::setConfig(jConfigCompiler::readAndCache($this->epInfo->configFile, null, $this->entryPoint));
     jApp::setCoord(new jCoordinator('', false));
     if ($modulesTests == 0) {
         // we add all modules in the test list
         $suite = $this->getAllModulesTestSuites();
         if (count($suite)) {
             $this->arguments['test'] = $suite;
             unset($this->arguments['testFile']);
         } else {
             $this->showMessage("Error: no tests in modules\n");
             exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
         }
     } else {
         if ($modulesTests == 1 && !$this->version36) {
             $suite = $this->getModuleTestSuite($this->options[1][0]);
             if (count($suite)) {
                 $this->arguments['test'] = $suite;
                 if (isset($this->options[1][1])) {
                     // a specifique test file
                     $this->arguments['testFile'] = $this->options[1][1];
                 } else {
                     $this->arguments['testFile'] = '';
                 }
             } else {
                 $this->showMessage("Error: no tests in the module\n");
                 exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
             }
         } else {
             if ($modulesTests == 1) {
                 if (isset($this->options[1][1])) {
                     // a specifique test file
                     $suite = $this->getModuleTestSuite($this->options[1][0], $this->options[1][1]);
                 } else {
                     $suite = $this->getModuleTestSuite($this->options[1][0]);
                 }
                 if (count($suite)) {
                     $this->arguments['test'] = $suite;
                 } else {
                     $this->showMessage("Error: no tests in the module\n");
                     exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
                 }
             }
         }
     }
 }
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:82,代码来源:command.php

示例5: checkAppOpened

<?php

/**
* @package   lizmap
* @subpackage 
* @author    your name
* @copyright 2011 3liz
* @link      http://3liz.com
* @license    All rights reserved
*/
require_once __DIR__ . '/../application.init.php';
checkAppOpened();
require_once JELIX_LIB_CORE_PATH . 'jCmdlineCoordinator.class.php';
require_once JELIX_LIB_CORE_PATH . 'request/jCmdLineRequest.class.php';
jApp::setCoord(new jCmdlineCoordinator('cmdline/script.ini.php'));
jApp::coord()->process(new jCmdLineRequest());
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:16,代码来源:script.php


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