本文整理汇总了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;
}