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


PHP Wind::application方法代码示例

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


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

示例1: routerShutdown

 public function routerShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response)
 {
     if ($request->controller == 'Api') {
         require \Yaf\Registry::get('config')->application->phpwind->wekit_bin;
         Wekit::init('phpwind');
         $application = Wind::application('phpwind', Wekit::S());
     }
 }
开发者ID:randy-ran,项目名称:open-api-for-vopi,代码行数:8,代码来源:Wekit.php

示例2: provideApp

 private function provideApp()
 {
     $_SERVER['SCRIPT_FILENAME'] = "index.php";
     $_SERVER['SCRIPT_NAME'] = 'index.php';
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_FILENAME'] . '?c=long&a=noPrint';
     Wind::application("long", array('web-apps' => array('long' => array('modules' => array('default' => array('controller-path' => 'data', 'controller-suffix' => 'Controller', 'error-handler' => 'TEST:data.ErrorControllerTest'))))))->run();
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:8,代码来源:WindUrlHelperTest.php

示例3: setUp

 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'base\\WindFactory.php';
     require_once 'data\\ForWindFactoryTest.php';
     Wind::application()->createApplication();
     $this->factory || ($this->factory = Wind::getApp()->getWindFactory());
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:11,代码来源:WindFactoryTest.php

示例4: run

	/**
	 * 运行当前应用
	 *
	 * @param string $name 应用名称默认‘phpwind’
	 * @param array $components 组建配置信息 该组建配置将会覆盖原组建配置,默认为空
	 */
	public static function run($name = 'phpwind', $components = array()) {
		self::init($name);
		if (!empty($components)) self::$_sc['components'] = (array)$components + self::$_sc['components'];

		/* @var $application WindWebFrontController */
		$application = Wind::application($name, self::$_sc);
		$application->registeFilter(new PwFrontFilters($application));
		$application->run();
	}
开发者ID:healthguo,项目名称:PHP,代码行数:15,代码来源:wekit.php

示例5: setUp

 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'web\\WindWebApplication.php';
     require_once 'web\\WindForward.php';
     require_once 'base\\WindFactory.php';
     require_once 'data\\ForWindFactoryTest.php';
     $this->front = Wind::application("long", array('web-apps' => array('long' => array('modules' => array('default' => array('controller-path' => 'data', 'controller-suffix' => 'Controller', 'error-handler' => 'TEST:data.ErrorControllerTest'))))));
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:12,代码来源:WindWebApplicationTest.php

示例6: setUp

 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'base\\WindModule.php';
     require_once 'data\\TestFrontController.php';
     require_once 'data\\ForWindFactoryTest.php';
     require_once 'data\\LongController.php';
     Wind::application()->createApplication();
     $this->WindModule = new LongController();
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:13,代码来源:WindModuleTest.php

示例7: run

 /**
  * 运行当前应用
  *
  * @param string $name 应用名称默认‘phpwind’
  * @param array $components 组建配置信息 该组建配置将会覆盖原组建配置,默认为空
  */
 public static function run($name = 'phpwind', $components = array())
 {
     $config = WindUtility::mergeArray(include WEKIT_PATH . '../conf/application/default.php', include WEKIT_PATH . '../conf/application/' . $name . '.php');
     if (!empty($components)) {
         $config['components'] = (array) $components + $config['components'];
     }
     /* @var $application WindWebFrontController */
     $application = Wind::application($name, $config);
     $application->registeFilter(new PwFrontFilters($application));
     $application->run();
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:17,代码来源:wekit.php

示例8: testFormFilter

 public function testFormFilter()
 {
     $_SERVER['SCRIPT_FILENAME'] = "index.php";
     $_SERVER['SCRIPT_NAME'] = 'index.php';
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_FILENAME'] . '?c=long&a=test';
     $_POST['shi'] = 'shi';
     $_POST['long'] = 'long';
     Wind::application('EnableValidata', $this->getConfigData())->run();
     $testForm = Wind::getApp()->getRequest()->getAttribute("testForm");
     $this->assertEquals("shi", $testForm->getShi());
     $this->assertEquals("long", $testForm->getLong());
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:13,代码来源:WindEnableValidateModuleTest.php

示例9: testDispatch

 /**
  * Tests WindDispatcher->dispatch()
  */
 public function testDispatch()
 {
     $_SERVER['SCRIPT_FILENAME'] = "index.php";
     $_SERVER['SCRIPT_NAME'] = 'index.php';
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_FILENAME'] . '?c=long&a=noPrint';
     $front = Wind::application('long', array('web-apps' => array('long' => array('modules' => array('default' => array('controller-path' => 'data', 'controller-suffix' => 'Controller', 'error-handler' => 'TEST:data.ErrorControllerTest'))))))->run();
     $forward = new WindForward();
     $forward->setIsReAction(true);
     $forward->setAction('/long/test');
     ob_start();
     Wind::getApp()->doDispatch($forward);
     $this->assertEquals(ob_get_clean(), 'LongController-test');
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:17,代码来源:WindDispatcherTest.php

示例10: testErrorHandler

 public function testErrorHandler()
 {
     $front = Wind::application("WindError", array('web-apps' => array('WindError' => array('modules' => array('default' => array('controller-path' => 'data', 'controller-suffix' => 'Controller', 'error-handler' => 'TEST:data.ErrorControllerTest', 'compile-dir' => 'data'))))));
     $_SERVER['SCRIPT_FILENAME'] = "index.php";
     $_SERVER['SCRIPT_NAME'] = 'index.php';
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_FILENAME'] . '?a=shi&c=long';
     try {
         $front->run();
     } catch (Exception $e) {
         $this->assertEquals("error handled", $e->getMessage());
         return;
     }
     $this->fail("Error Handler Test Error");
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:15,代码来源:WindErrorHandlerTest.php

示例11: setUp

 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->WindFrontController = Wind::application("long", array('web-apps' => array('long' => $this->appConfigData())));
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:8,代码来源:WindFrontControllerTest.php

示例12: error_reporting

<?php

error_reporting(0);
@header("Content-Type:text/html; charset=utf-8");
define('SCR', 'aCloud_index');
define('WIND_DEBUG', 0);
require_once '.././src/wekit.php';
$front = Wind::application('acloud', WEKIT_PATH . 'aCloud/aCloudConfig.php');
// $front->createApplication();
Wekit::createapp('acloud');
$config = (include WEKIT_PATH . '../conf/application/default.php');
Wekit::app()->charset = $config['web-apps']['default']['charset'];
require_once WEKIT_PATH . 'aCloud/aCloud.php';
$router = new ACloudRouter();
$router->run();
开发者ID:fanqimeng,项目名称:4tweb,代码行数:15,代码来源:index.php

示例13: error_reporting

<?php

error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
require './src/wekit.php';
/* @var $application WindWebFrontController */
Wind::application('install', WindUtility::mergeArray(include WEKIT_PATH . '../conf/application/default.php', include WEKIT_PATH . '../conf/application/install.php'))->run();
开发者ID:fanqimeng,项目名称:4tweb,代码行数:6,代码来源:install.php

示例14: testResolveActionFilter

 public function testResolveActionFilter()
 {
     require_once 'data/Listener.php';
     Wind::application()->createApplication();
     $errorMessage = new WindErrorMessage("shi");
     $this->testController->setErrorMessage($errorMessage);
     $forward = new WindForward();
     $forward->setAction("long");
     $this->testController->setForward($forward);
     $_GET['name'] = 'shilong';
     $this->testController->setGlobal('shilong', 'name');
     $forward->setVars('name', 'xxxxx');
     $_GET['wuq'] = 'wuq';
     $this->testController->resolveActionFilter($this->dataForResolveActionFilter());
     $this->assertEquals("post_post_post_pre_pre_pre_shi", $errorMessage->getError(0));
     $this->assertEquals("post_post_post_pre_pre_pre_long", $forward->getAction());
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:17,代码来源:WindControllerTest.php

示例15: error_reporting

<?php

error_reporting(E_ALL);
//define('WIND_DEBUG', 0);
require_once '../../wind/Wind.php';
Wind::application()->run();
开发者ID:jellycheng,项目名称:windframework,代码行数:6,代码来源:index.php


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