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


PHP Solar::start方法代码示例

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


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

示例1: testGetTextRaw_badLocaleKey

 public function testGetTextRaw_badLocaleKey()
 {
     Solar::start(false);
     $actual = $this->_view->getTextRaw('no such "locale" key');
     $expect = 'no such "locale" key';
     $this->assertSame($actual, $expect);
 }
开发者ID:btweedy,项目名称:foresmo,代码行数:7,代码来源:GetTextRawTest.php

示例2: setup

 public function setup()
 {
     Solar::start(false);
     // to get the $locale object
     parent::setup();
     // when running from the command line, these elements are empty.
     // add them so that web-like testing can occur.
     $this->_request->server['HTTP_HOST'] = 'example.com';
     $this->_request->server['SCRIPT_NAME'] = '/path/to/index.php';
     $this->_request->server['PATH_INFO'] = '/appname/action';
     $this->_request->server['QUERY_STRING'] = '';
     $this->_request->server['REQUEST_URI'] = $this->_request->server['SCRIPT_NAME'] . $this->_request->server['PATH_INFO'] . '?' . $this->_request->server['QUERY_STRING'];
     // emulate GET vars from the URI and inject to $this->_request
     parse_str($this->_request->server['QUERY_STRING'], $this->_request->get);
 }
开发者ID:btweedy,项目名称:foresmo,代码行数:15,代码来源:AnchorImageTest.php

示例3: dirname

 * 
 * When you're ready to really get going, point your web server document root 
 * to `system/docroot/` and turn on mod_rewrite.
 * 
 */
// Solar system directory
$system = dirname(__FILE__);
// set the include-path
set_include_path("{$system}/include");
// load Solar
require_once 'Solar.php';
// get the system config array
$config = (require "{$system}/config.php");
// force the Action and Public URI path configs, overwriting anything from
// the original config
$path = $_SERVER['REQUEST_URI'];
$pos = strpos($path, "/index.php");
if ($pos !== false) {
    // strip "/index.php" and everything after it
    $path = substr($path, 0, $pos);
}
$path = rtrim($path, '/');
$config['Solar_Uri_Action']['path'] = "{$path}/index.php";
$config['Solar_Uri_Public']['path'] = "{$path}/docroot/public";
// start Solar with the modified config values
Solar::start($config);
// instantiate and run the front controller
$front = Solar_Registry::get('controller_front');
$front->display();
// Done!
Solar::stop();
开发者ID:abtris,项目名称:solarphp-quickstart,代码行数:31,代码来源:index.php

示例4: setup

 public function setup()
 {
     Solar::start(false);
     // to get the $locale object
     parent::setup();
 }
开发者ID:btweedy,项目名称:foresmo,代码行数:6,代码来源:AnchorTest.php

示例5: set_include_path

<?php

set_include_path('../include');
require_once 'Solar.php';
$config_file = '../config/JForg.conf.php';
Solar::start($config_file);
$front = Solar::factory('Solar_Controller_Front');
$front->display();
Solar::stop();
开发者ID:BackupTheBerlios,项目名称:jabberfriends-svn,代码行数:9,代码来源:index.php

示例6: define

<?php

/**
 * 
 * Copy this file, edit the SOLAR_CONFIG_PATH to point to your
 * config file, then run from the command line.
 * 
 */
define('SOLAR_CONFIG_PATH', '/path/to/Solar.config.php');
require 'Solar.php';
Solar::start();
$sql = Solar::factory('Solar_Sql');
// DROP INDEX nodes__unique_in_area__i ON nodes;
$sql->dropIndex('nodes', 'unique_in_area');
// CREATE UNIQUE INDEX nodes__area_type_name__i ON nodes (area_id, type, name);
$sql->createIndex('nodes', 'area_type_name', true, array('area_id', 'type', 'name'));
// done!
echo "Done!\n";
开发者ID:btweedy,项目名称:foresmo,代码行数:18,代码来源:content.sql.php

示例7: setUp

 public function setUp()
 {
     Solar::start('config.inc.php');
 }
开发者ID:btweedy,项目名称:foresmo,代码行数:4,代码来源:FilterTest.php

示例8: setUp

 public function setUp()
 {
     Solar::start('config.inc.php');
     $this->_view = Solar::factory('Solar_View');
 }
开发者ID:btweedy,项目名称:foresmo,代码行数:5,代码来源:ViewTest.php


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