本文整理汇总了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);
}
示例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());
示例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();
示例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);
}
}
}
}
}
示例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());