当前位置: 首页>>代码示例>>PHP>>正文


PHP S::isObj方法代码示例

本文整理汇总了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']);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:job.class.php

示例2: init

 function init()
 {
     if (!S::isObj($this->_service)) {
         $this->_service = new GatherQuery_UserDefine_PW_PingLog_Impl();
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:pw_pinglog.query.php

示例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);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:18,代码来源:jobcenter.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:27,代码来源:gather.class.php

示例5: init

 function init()
 {
     if (!S::isObj($this->_service)) {
         $this->_service = new GatherQuery_UserDefine_PW_Weibo_content_Impl();
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:pw_weibo_content.query.php


注:本文中的S::isObj方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。