本文整理匯總了PHP中WindidApi::open方法的典型用法代碼示例。如果您正苦於以下問題:PHP WindidApi::open方法的具體用法?PHP WindidApi::open怎麽用?PHP WindidApi::open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WindidApi
的用法示例。
在下文中一共展示了WindidApi::open方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteConfig
/**
* 刪除配置項
* Enter description here ...
* @param string $spacename
* @param array|string $keys
*/
public function deleteConfig($spacename, $keys = '')
{
if (!is_array($keys)) {
$keys = array($keys);
}
$params = array('spacename' => $spacename, 'keys' => implode('_', $keys));
return WindidApi::open('config/delete', array(), $params);
}
示例2: getAll
public function getAll()
{
$params = array();
return WindidApi::open('area/getAll', $params);
if (!is_array($result)) {
return array();
}
return $result;
}
示例3: defaultAvatar
/**
* 還原頭像
*
* @param int $uid
* @param string $type 還原類型-一種默認頭像face*,一種是禁止頭像ban*
* @return boolean
*/
public function defaultAvatar($uid, $type = 'face')
{
$client = Windid::client();
if ($client->windid == 'local') {
$srv = Windid::load('user.srv.WindidUserService');
$result = $srv->defaultAvatar($uid, $type);
return (int) $result;
}
$params = array('uid' => $uid, 'type' => $type);
return WindidApi::open('avatar/default', array(), $params);
}
示例4: searchSchool
public function searchSchool($search, $limit = 10, $start = 0)
{
if (!is_array($search)) {
return array();
}
$params = array('limit' => $limit, 'start' => $start);
$array = array('name', 'typeid', 'areaid', 'firstchar');
foreach ($search as $k => $v) {
if (!in_array($k, $array)) {
continue;
}
$params[$k] = $v;
}
return WindidApi::open('school/search', $params);
}
示例5: deleteMessages
public function deleteMessages($uid, $messageIds)
{
$params = array('uid' => $uid, 'messageIds' => $messageIds);
return WindidApi::open('message/deleteMessages', array(), $params);
}
示例6: setCredits
public function setCredits($credits)
{
$params = array('credits' => $credits);
return WindidApi::open('config/setCredits', array(), $params);
}
示例7: logSend
public function logSend($logid)
{
$params = array('logid' => $logid);
return WindidApi::open('notify/logSend', array(), $params);
}
示例8: deleteSchool
public function deleteSchool($schoolid)
{
$params = array('id' => $schoolid);
return WindidApi::open('school/delete', array(), $params);
}
示例9: defaultAvatar
/**
* 還原頭像
*
* @param int $uid
* @param string $type 還原類型-一種默認頭像face*,一種是禁止頭像ban*
* @return boolean
*/
public function defaultAvatar($uid, $type = 'face')
{
$params = array('uid' => $uid, 'type' => $type);
return WindidApi::open('avatar/default', array(), $params);
}
示例10: delBlack
/**
* 刪除某的黑名單 $blackUid為空刪除所有
*
* @param int $uid
* @param int $blackUid
*/
public function delBlack($uid, $blackUid = '')
{
$params = array('uid' => $uid, 'blackUid' => $blackUid);
return WindidApi::open('user/delBlack', array(), $params);
}
示例11: deleteArea
public function deleteArea($areaid)
{
$params = array('id' => $areaid);
return WindidApi::open('area/delete', array(), $params);
}
示例12: editApp
public function editApp(WindidAppDm $dm)
{
$params = array('id' => $dm->id);
$params += $dm->getData();
return WindidApi::open('app/edit', array(), $params);
}
示例13: addDmUser
/**
* 添加用戶對象接口,使用前必須使用WidnidApi::getDm('user') 設置數據
* Enter description here ...
* @param WindidUserDm $dm
*/
public function addDmUser($dm)
{
Wind::import('WINDID:service.user.dm.WindidUserDm');
if (!$dm instanceof WindidUserDm) {
return WindidError::CLASS_ERROR;
}
$result = $this->_getUserDs()->addUser($dm);
if ($result instanceof WindidError) {
return WindidError::FAIL;
}
$uid = (int) $result;
$client = Windid::client();
if ($client->windid == 'local') {
$srv = Windid::load('user.srv.WindidUserService');
$result = $srv->defaultAvatar($uid, 'face');
} else {
$params = array('uid' => $uid, 'type' => 'face');
WindidApi::open('avatar/default', array(), $params);
}
$this->_getNotifyClient()->send('register', $uid);
return $uid;
}