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


PHP BxDolService::isSerializedService方法代码示例

本文整理汇总了PHP中BxDolService::isSerializedService方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolService::isSerializedService方法的具体用法?PHP BxDolService::isSerializedService怎么用?PHP BxDolService::isSerializedService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxDolService的用法示例。


在下文中一共展示了BxDolService::isSerializedService方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addTransientJobService

 public function addTransientJobService($sName, $mixedService)
 {
     if (is_array($mixedService)) {
         $mixedService = call_user_func_array('BxDolService::getSerializedService', $mixedService);
     }
     if (!BxDolService::isSerializedService($mixedService)) {
         return false;
     }
     $sQuery = $this->prepare("INSERT INTO `sys_cron_jobs` SET `name`=?, `time`='transient', `service_call`=?", $sName, $mixedService);
     return (int) $this->query($sQuery) > 0;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:11,代码来源:BxDolCronQuery.php

示例2: updateCache

 public function updateCache()
 {
     $aWidgets = array();
     $this->oDb->getWidgets(array('type' => 'all_with_notices'), $aWidgets, false);
     $aResult = array();
     foreach ($aWidgets as $aWidget) {
         if (BxDolService::isSerializedService($aWidget['cnt_notices'])) {
             $aService = unserialize($aWidget['cnt_notices']);
             $sNotices = BxDolService::call($aService['module'], $aService['method'], array_merge(array($aWidget), $aService['params']), $aService['class']);
         }
         $aResult[$aWidget['id']] = $sNotices;
     }
     $oCache = $this->oDb->getDbCacheObject();
     $sCacheKey = $this->oDb->genDbCacheKey($this->sCacheKeyNotices);
     return $oCache->setData($sCacheKey, $aResult);
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:16,代码来源:BxDolStudioWidgets.php

示例3: processInjection

 /**
  * * * * Static methods for work with template injections * * *
  *
  * Static method is used to add/replace the content of some key in the template.
  * It's usefull when you don't want to modify existing template but need to add some data to existing template key.
  *
  * @param  integer $iPageIndex - page index where injections would processed. Use 0 if you want it to be done on all the pages.
  * @param  string  $sKey       - template key.
  * @param  string  $sValue     - the data to be added.
  * @return string  the result of operation.
  */
 function processInjection($iPageIndex, $sKey, $sValue = "")
 {
     if ($iPageIndex != 0 && isset($this->aPage['injections']['page_0'][$sKey]) && isset($this->aPage['injections']['page_' . $iPageIndex][$sKey])) {
         $aSelection = @array_merge($this->aPage['injections']['page_0'][$sKey], $this->aPage['injections']['page_' . $iPageIndex][$sKey]);
     } else {
         if (isset($this->aPage['injections']['page_0'][$sKey])) {
             $aSelection = $this->aPage['injections']['page_0'][$sKey];
         } else {
             if (isset($this->aPage['injections']['page_' . $iPageIndex][$sKey])) {
                 $aSelection = $this->aPage['injections']['page_' . $iPageIndex][$sKey];
             } else {
                 $aSelection = array();
             }
         }
     }
     if (is_array($aSelection)) {
         foreach ($aSelection as $aInjection) {
             if (isset($GLOBALS['bx_profiler'])) {
                 $GLOBALS['bx_profiler']->beginInjection($sRand = time() . rand());
             }
             $sInjData = '';
             switch ($aInjection['type']) {
                 case 'text':
                     $sInjData = $aInjection['data'];
                     break;
                 case 'service':
                     if (BxDolService::isSerializedService($aInjection['data'])) {
                         $sInjData = BxDolService::callSerialized($aInjection['data']);
                     }
                     break;
             }
             if ((int) $aInjection['replace'] == 1) {
                 $sValue = $sInjData;
             } else {
                 $sValue .= $sInjData;
             }
             if (isset($GLOBALS['bx_profiler'])) {
                 $GLOBALS['bx_profiler']->endInjection($sRand, $aInjection);
             }
         }
     }
     return $sValue != '__' . $sKey . '__' ? str_replace('__' . $sKey . '__', '', $sValue) : $sValue;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:54,代码来源:BxDolTemplate.php

示例4: alert

 /**
  * Notifies the necessary handlers about the alert.
  */
 public function alert()
 {
     if (isset($this->_aAlerts[$this->sUnit]) && isset($this->_aAlerts[$this->sUnit][$this->sAction])) {
         foreach ($this->_aAlerts[$this->sUnit][$this->sAction] as $iHandlerId) {
             $aHandler = $this->_aHandlers[$iHandlerId];
             if (isset($GLOBALS['bx_profiler']) && 'bx_profiler' != $aHandler['name']) {
                 $GLOBALS['bx_profiler']->beginAlert($this->sUnit, $this->sAction, $aHandler['name']);
             }
             if (!empty($aHandler['file']) && !empty($aHandler['class']) && file_exists(BX_DIRECTORY_PATH_ROOT . $aHandler['file'])) {
                 if (!class_exists($aHandler['class'], false)) {
                     require_once BX_DIRECTORY_PATH_ROOT . $aHandler['file'];
                 }
                 $oHandler = new $aHandler['class']();
                 $oHandler->response($this);
             } else {
                 if (!empty($aHandler['service_call']) && BxDolService::isSerializedService($aHandler['service_call'])) {
                     $aService = unserialize($aHandler['service_call']);
                     $aParams = array($this);
                     if (isset($aService['params']) && is_array($aService['params'])) {
                         $aParams = array_merge($aParams, $aService['params']);
                     }
                     BxDolService::call($aService['module'], $aService['method'], $aParams, isset($aService['class']) ? $aService['class'] : 'Module');
                 }
             }
             if (isset($GLOBALS['bx_profiler']) && 'bx_profiler' != $aHandler['name']) {
                 $GLOBALS['bx_profiler']->endAlert($this->sUnit, $this->sAction, $aHandler['name']);
             }
         }
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:33,代码来源:BxDolAlerts.php

示例5: _getRequestedDataBySystem

 protected function _getRequestedDataBySystem($aSystem, $iCachedData = 0)
 {
     if (!BxDolService::isSerializedService($aSystem['service_call'])) {
         return false;
     }
     $aResponce = BxDolService::callSerialized($aSystem['service_call'], array('count' => (int) $iCachedData));
     if (empty($aResponce) || !is_array($aResponce) || !isset($aResponce['count'], $aResponce['method'])) {
         return false;
     }
     return $aResponce;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:11,代码来源:BxDolLiveUpdates.php

示例6: runJob

function runJob($aJob)
{
    if (!empty($aJob['file']) && !empty($aJob['class']) && file_exists(BX_DIRECTORY_PATH_ROOT . $aJob['file'])) {
        if (!class_exists($aJob['class'])) {
            require_once BX_DIRECTORY_PATH_ROOT . $aJob['file'];
        }
        $oHandler = new $aJob['class']();
        $oHandler->processing();
    } else {
        if (!empty($aJob['service_call']) && BxDolService::isSerializedService($aJob['service_call'])) {
            BxDolService::callSerialized($aJob['service_call']);
        }
    }
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:14,代码来源:cron.php

示例7: field

 protected function field($aItem)
 {
     $aField = array();
     switch ($aItem['type']) {
         case 'digit':
             $aField = array('type' => 'text', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => $aItem['value'], 'db' => array('pass' => 'Xss'));
             break;
         case 'text':
             $aField = array('type' => 'textarea', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => $aItem['value'], 'db' => array('pass' => 'XssHtml'));
             break;
         case 'checkbox':
             $aField = array('type' => 'checkbox', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => 'on', 'checked' => $aItem['value'] == 'on', 'db' => array('pass' => 'Xss'));
             break;
         case 'list':
         case 'rlist':
             $aField = array('type' => 'checkbox_set', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => !empty($aItem['value']) ? explode(',', $aItem['value']) : array(), 'reverse' => $aItem['type'] == 'rlist', 'db' => array('pass' => 'Xss'));
             if (BxDolService::isSerializedService($aItem['extra'])) {
                 $aField['values'] = BxDolService::callSerialized($aItem['extra']);
             } else {
                 foreach (explode(',', $aItem['extra']) as $sValue) {
                     $aField['values'][$sValue] = $sValue;
                 }
             }
             break;
         case 'select':
             $aField = array('type' => 'select', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => $aItem['value'], 'values' => array(), 'db' => array('pass' => 'Xss'));
             if (BxDolService::isSerializedService($aItem['extra'])) {
                 $aField['values'] = BxDolService::callSerialized($aItem['extra']);
             } else {
                 foreach (explode(',', $aItem['extra']) as $sValue) {
                     $aField['values'][] = array('key' => $sValue, 'value' => $sValue);
                 }
             }
             break;
         case 'file':
             $aField = array('type' => 'file', 'name' => $aItem['name'], 'caption' => _t($aItem['caption']), 'value' => $aItem['value'], 'db' => array('pass' => 'Xss'));
             break;
     }
     return $aField;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:40,代码来源:BxBaseStudioSettings.php

示例8: _getRequestedData

 protected function _getRequestedData($iIndex = 0, $bIndexCheck = false)
 {
     $aResult = array();
     foreach ($this->_aSystems as $aSystem) {
         if (empty($aSystem) || !is_array($aSystem) || (int) $aSystem['active'] != 1) {
             continue;
         }
         if ($bIndexCheck && $iIndex % (int) $aSystem['frequency'] != 0) {
             continue;
         }
         if (!BxDolService::isSerializedService($aSystem['service_call'])) {
             continue;
         }
         $aResponce = BxDolService::callSerialized($aSystem['service_call']);
         if (empty($aResponce) || !is_array($aResponce) || !isset($aResponce['count'], $aResponce['method'])) {
             continue;
         }
         $aResult[$aSystem['name']] = $aResponce;
     }
     return $aResult;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:21,代码来源:BxDolLiveUpdates.php

示例9: getEmptyValue

 protected function getEmptyValue($aOption)
 {
     $mixedValue = '';
     switch ($aOption['type']) {
         case 'digit':
             $mixedValue = 0;
             break;
         case 'select':
             if (BxDolService::isSerializedService($aOption['extra'])) {
                 $aValues = BxDolService::callSerialized($aOption['extra']);
             } else {
                 $aValues = explode(',', $aOption['extra']);
             }
             $mixedValue = $aValues[0];
             break;
         case 'text':
         case 'checkbox':
         case 'file':
             $mixedValue = "";
             break;
     }
     return $mixedValue;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:23,代码来源:BxDolStudioSettings.php


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