本文整理汇总了PHP中Cloud::loadFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Cloud::loadFile方法的具体用法?PHP Cloud::loadFile怎么用?PHP Cloud::loadFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cloud
的用法示例。
在下文中一共展示了Cloud::loadFile方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onCommonGetNavs
public function onCommonGetNavs($type = '')
{
Cloud::loadFile('Service_SearchHelper');
$navtype = null;
switch ($type) {
case 'footer':
$navtype = 1;
break;
case 'space':
$navtype = 2;
break;
case 'my':
$navtype = 3;
break;
case 'header':
$navtype = 0;
break;
}
$navs = $subNavs = array();
foreach (C::t('common_nav')->fetch_all_by_navtype($navtype) as $nav) {
if (!$nav['parentid']) {
$navs[$nav['id']] = Cloud_Service_SearchHelper::convertNav($nav);
} else {
$subNavs[$nav['id']] = $nav;
}
}
foreach ($subNavs as $k => $v) {
$navs[$v['parentid']]['navs'][$v['id']] = Cloud_Service_SearchHelper::convertNav($v);
}
return $navs;
}
示例2: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: OEM.php 33992 2013-09-17 01:01:52Z nemohou $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_Client_Restful');
class Cloud_Service_Client_OEM extends Cloud_Service_Client_Restful
{
protected static $_instance;
public static function getInstance($debug = false)
{
if (!self::$_instance instanceof self) {
self::$_instance = new self($debug);
}
return self::$_instance;
}
public function __construct($debug = false)
{
return parent::__construct($debug);
}
public function checkApp()
{
if (!$this->_sId) {
return array();
}
示例3: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: class_cloudregister.php 33799 2013-08-15 02:29:22Z nemohou $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_Client_Cloud');
class Cloud_Register extends Cloud_Service_Client_Cloud
{
public $appIdentifier;
public $pluginid;
protected $lang;
public function __construct($appIdentifier, $pluginid, $startStep, $debug = false)
{
global $_G;
parent::__construct($debug);
$this->appIdentifier = $appIdentifier;
$this->pluginid = $pluginid;
$step = !empty($_GET['step']) ? authcode($_GET['step'], 'DECODE', $_G['config']['security']['authkey']) : $startStep;
$method = 'step_' . $step;
$this->lang = lang('cloud_register');
if (!empty($_GET['skip'])) {
return false;
}
if (method_exists($this, $method)) {
return $this->{$method}();
示例4: _searchStatusCallback
private function _searchStatusCallback($appName, $status)
{
$available = 0;
if ($status == 'normal') {
$available = 1;
}
C::t('common_setting')->update('my_search_status', $available);
if ($available) {
Cloud::loadFile('Service_SearchHelper');
Cloud_Service_SearchHelper::allowSearchForum();
}
$this->setPluginAvailable('cloudsearch', $available);
return true;
}
示例5: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: Search.php 31868 2012-10-18 03:38:22Z zhouxiaobo $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_SearchHelper');
class Cloud_Service_Server_Search extends Cloud_Service_Server_Restful
{
protected static $_instance;
public static function getInstance()
{
if (!self::$_instance instanceof self) {
self::$_instance = new self();
}
return self::$_instance;
}
public function onSearchGetUserGroupPermissions($userGroupIds)
{
if (!$userGroupIds) {
return array();
}
$result = Cloud_Service_SearchHelper::getUserGroupPermissions($userGroupIds);
return $result;
}
public function onSearchGetUpdatedPosts($num, $lastPostIds = array())
示例6: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: Manyou.php 33053 2013-04-12 10:09:51Z zhengqingpeng $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_Client_RestfulException');
class Cloud_Service_Client_Manyou
{
private $_myurl = 'http://api.manyou.com/uchome.php';
protected static $_instance;
public static function getInstance()
{
if (!self::$_instance instanceof self) {
self::$_instance = new self();
}
return self::$_instance;
}
public function __construct()
{
}
public function sync()
{
global $_G;
$this->getResponse('siteRefresh');
return true;
示例7: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: ConnectOAuth.php 32196 2012-11-28 02:34:36Z liudongdong $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_Connect');
Cloud::loadFile('Service_Client_OAuth');
class Cloud_Service_Client_ConnectOAuth extends Cloud_Service_Client_OAuth
{
private $_requestTokenURL = 'http://openapi.qzone.qq.com/oauth/qzoneoauth_request_token';
private $_oAuthAuthorizeURL = 'http://openapi.qzone.qq.com/oauth/qzoneoauth_authorize';
private $_accessTokenURL = 'http://openapi.qzone.qq.com/oauth/qzoneoauth_access_token';
private $_getUserInfoURL = 'http://openapi.qzone.qq.com/user/get_user_info';
private $_addShareURL = 'http://openapi.qzone.qq.com/share/add_share';
private $_addWeiBoURL = 'http://openapi.qzone.qq.com/wb/add_weibo';
private $_addTURL = 'http://openapi.qzone.qq.com/t/add_t';
private $_addPicTURL = 'http://openapi.qzone.qq.com/t/add_pic_t';
private $_getReportListURL = 'http://openapi.qzone.qq.com/t/get_repost_list';
// 用于请求失败或返回空时抛出的异常
const RESPONSE_ERROR = 999;
const RESPONSE_ERROR_MSG = 'request failed';
/**
* $_instance
*/
protected static $_instance;
示例8: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: Restful.php 29263 2012-03-31 05:45:08Z yexinhao $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
define('MY_FRIEND_NUM_LIMIT', 2000);
Cloud::loadFile('Service_Server_RestfulException');
Cloud::loadFile('Service_Server_Response');
Cloud::loadFile('Service_Server_ErrorResponse');
abstract class Cloud_Service_Server_Restful
{
protected static $_instance;
public static function getInstance()
{
if (!self::$_instance instanceof self) {
self::$_instance = new self();
}
return self::$_instance;
}
protected function _myAddslashes($string)
{
if (is_array($string)) {
foreach ($string as $key => $val) {
$string[$key] = $this->_myAddslashes($val);
}
示例9: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: Mobile.php 34063 2013-09-26 05:37:52Z nemohou $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
Cloud::loadFile('Service_Server_Restful');
class Cloud_Service_Server_Mobile extends Cloud_Service_Server_Restful
{
protected static $_instance;
public static function getInstance()
{
if (!self::$_instance instanceof self) {
self::$_instance = new self();
}
return self::$_instance;
}
public function onMobileLoginToken($deviceToken, $uid)
{
return C::t("#mobile#common_devicetoken")->loginToken($deviceToken, $uid);
}
public function onMobileLogoutToken($deviceToken, $uid)
{
return C::t("#mobile#common_devicetoken")->logoutToken($deviceToken);
}
public function onMobileClearToken($deviceToken)