mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 09:19:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9855 201d5d3c-b55e-5fd7-737f-ddc643e51545
63 lines
1.2 KiB
PHP
63 lines
1.2 KiB
PHP
<?php
|
|
|
|
if(!defined('FOLLOW_REQUEST_SSL')) define('FOLLOW_REQUEST_SSL',0);
|
|
if(!defined('ENFORCE_SSL')) define('ENFORCE_SSL',1);
|
|
if(!defined('RELEASE_SSL')) define('RELEASE_SSL',2);
|
|
if(!defined('MOCK_CONTEXT')) define('MOCK_CONTEXT', 1);
|
|
|
|
class Context
|
|
{
|
|
public static $mock_vars = array();
|
|
|
|
public function gets() {
|
|
$args = func_get_args();
|
|
$output = new stdClass;
|
|
|
|
foreach($args as $name) {
|
|
$output->{$name} = Context::$mock_vars[$name];
|
|
}
|
|
|
|
return $output;
|
|
}
|
|
|
|
public function get($name) {
|
|
return array_key_exists($name, Context::$mock_vars)?Context::$mock_vars[$name]:'';
|
|
}
|
|
|
|
public function getRequestVars() {
|
|
return Context::$mock_vars;
|
|
}
|
|
|
|
public function set($name, $value) {
|
|
Context::$mock_vars[$name] = $value;
|
|
}
|
|
|
|
public function getLangType() {
|
|
return 'en';
|
|
}
|
|
|
|
public function getLang($str) {
|
|
return $str;
|
|
}
|
|
|
|
public function truncate() {
|
|
Context::$mock_vars = array();
|
|
}
|
|
|
|
public function getDBInfo() {
|
|
global $use_cdn;
|
|
|
|
$dbInfo = new stdClass;
|
|
$dbInfo->use_cdn = $use_cdn;
|
|
|
|
return $dbInfo;
|
|
}
|
|
|
|
public function getRequestUrl() {
|
|
global $request_url;
|
|
return $request_url;
|
|
}
|
|
}
|
|
|
|
/* End of file Context.mock.php */
|
|
/* Location: ./tests/classes/context/Context.mock.php */
|