本文整理汇总了PHP中S::isObj方法的典型用法代码示例。如果您正苦于以下问题:PHP S::isObj方法的具体用法?PHP S::isObj怎么用?PHP S::isObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S
的用法示例。
在下文中一共展示了S::isObj方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jobRewardCredit
function jobRewardCredit($userid, $reward, $job)
{
global $credit;
!S::isObj($credit) && (require_once R_P . "require/credit.php");
$userService = $this->_getUserService();
$user = $userService->get($userid);
$GLOBALS[job] = $job['title'];
/*任务名称*/
$credit->addLog('other_finishjob', array($reward['type'] => $reward['num']), array('uid' => $userid, 'username' => $user['username'], 'ip' => $GLOBALS['onlineip']));
$credit->set($userid, $reward['type'], $reward['num']);
}
示例2: init
function init()
{
if (!S::isObj($this->_service)) {
$this->_service = new GatherQuery_UserDefine_PW_PingLog_Impl();
}
}
示例3: getPunchReward
function getPunchReward($reward)
{
global $credit, $winduid, $windid;
$reward = S::isArray($reward) ? $reward : unserialize($reward);
if (!$reward) {
return array(false, '');
}
!S::isObj($credit) && (require_once R_P . "require/credit.php");
$behaviorService = L::loadClass('behaviorservice', 'user');
list($continues) = $behaviorService->doBehavior($winduid, 'continue_punch', 0, true);
$reward['step'] < 1 && ($reward['step'] = 1);
$steps = $continues > 0 ? $continues - 1 : 0;
$awardNum = $reward['min'] + $steps * $reward['step'] > $reward['max'] ? $reward['max'] : $reward['min'] + $steps * $reward['step'];
$credit->addLog('other_finishpunch', array($reward['type'] => $awardNum), array('uid' => $winduid, 'username' => $windid, 'ip' => $GLOBALS['onlineip']));
$credit->set($winduid, $reward['type'], $awardNum);
$unit = isset($credit->cUnit[$reward['type']]) ? $credit->cUnit[$reward['type']] : '';
return array(true, pwCreditNames($reward['type']) . '+' . $awardNum, $continues);
}
示例4: dispatchQuery
function dispatchQuery($userDefineClass, $operate, $tableName, $fields, $expand = array())
{
if (!S::isObj($userDefineClass) || !$operate || !S::isArray($fields)) {
return false;
}
$userDefineClass->init();
switch (strtolower($operate)) {
case 'insert':
$userDefineClass->insert($tableName, $fields, $expand);
break;
case 'replace':
$userDefineClass->insert($tableName, $fields, $expand);
break;
case 'select':
$userDefineClass->select($tableName, $fields, $expand);
break;
case 'update':
$userDefineClass->update($tableName, $fields, $expand);
break;
case 'delete':
$userDefineClass->delete($tableName, $fields, $expand);
break;
default:
break;
}
return true;
}
示例5: init
function init()
{
if (!S::isObj($this->_service)) {
$this->_service = new GatherQuery_UserDefine_PW_Weibo_content_Impl();
}
}