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


PHP bx_gen_method_name函数代码示例

本文整理汇总了PHP中bx_gen_method_name函数的典型用法代码示例。如果您正苦于以下问题:PHP bx_gen_method_name函数的具体用法?PHP bx_gen_method_name怎么用?PHP bx_gen_method_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: response

 /**
  * Overwritten method of parent class.
  *
  * @param BxDolAlerts $oAlert an instance of alert.
  */
 public function response($oAlert)
 {
     $iObjectPrivacyView = $this->_getObjectPrivacyView($oAlert->aExtras);
     if ($iObjectPrivacyView == BX_DOL_PG_HIDDEN) {
         return;
     }
     $aHandler = $this->_oModule->_oConfig->getHandlers($oAlert->sUnit . '_' . $oAlert->sAction);
     switch ($aHandler['type']) {
         case BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT:
             $sMethod = 'getInsertData' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);
             if (!method_exists($this, $sMethod)) {
                 $sMethod = 'getInsertData';
             }
             $iId = $this->_oModule->_oDb->insertEvent($this->{$sMethod}($oAlert));
             if (!empty($iId)) {
                 $this->_oModule->onPost($iId);
             }
             break;
         case BX_BASE_MOD_NTFS_HANDLER_TYPE_UPDATE:
             $this->_oModule->_oDb->updateEvent(array('object_privacy_view' => $iObjectPrivacyView), array('type' => $oAlert->sUnit, 'object_id' => $oAlert->iObject));
             break;
         case BX_BASE_MOD_NTFS_HANDLER_TYPE_DELETE:
             if ($oAlert->sUnit == 'profile' && $oAlert->sAction == 'delete') {
                 $this->_oModule->_oDb->deleteEvent(array('owner_id' => $oAlert->iObject));
                 break;
             }
             $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
             $this->_oModule->_oDb->deleteEvent(array('type' => $oAlert->sUnit, 'action' => $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'], 'object_id' => $oAlert->iObject, 'subobject_id' => $this->_getSubObjectId($oAlert->aExtras)));
             break;
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:36,代码来源:BxNtfsResponse.php

示例2: response

 /**
  * Overwtire the method of parent class.
  *
  * @param BxDolAlerts $oAlert an instance of alert.
  */
 public function response($oAlert)
 {
     $sMethod = '_process' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);
     if (!method_exists($this, $sMethod)) {
         return;
     }
     return $this->{$sMethod}($oAlert);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:13,代码来源:BxInvResponse.php

示例3: run

 function run($sAction = '')
 {
     $sMethod = 'action' . bx_gen_method_name($sAction);
     if ($sAction && method_exists($this, $sMethod)) {
         $this->{$sMethod}();
     } else {
         $this->actionInitial();
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxDolInstallController.php

示例4: __construct

 function __construct($sSystem, $iId, $iInit = 1)
 {
     parent::__construct($sSystem, $iId, $iInit);
     if (empty($sSystem)) {
         return;
     }
     $this->_sJsObjName = 'oCmts' . bx_gen_method_name($sSystem, array('_', '-')) . $iId;
     $this->_sStylePrefix = isset($this->_aSystem['root_style_prefix']) ? $this->_aSystem['root_style_prefix'] : 'cmt';
     BxDolTemplate::getInstance()->addJsTranslation('_sys_txt_cmt_loading');
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:10,代码来源:BxBaseCmts.php

示例5: __construct

 public function __construct($sSystem, $iId, $iInit = 1)
 {
     parent::__construct($sSystem, $iId, $iInit);
     $this->_sJsObjName = 'oVote' . bx_gen_method_name($sSystem, array('_', '-')) . $iId;
     $this->_sStylePrefix = 'bx-vote';
     $sHtmlId = str_replace(array('_', ' '), array('-', '-'), $sSystem) . '-' . $iId;
     $this->_aHtmlIds = array('main_stars' => 'bx-vote-stars-' . $sHtmlId, 'main_likes' => 'bx-vote-likes-' . $sHtmlId, 'counter' => 'bx-vote-counter-' . $sHtmlId, 'by_popup' => 'bx-vote-by-popup-' . $sHtmlId);
     $this->_aElementDefaults = array('stars' => array('show_do_vote_legend' => false, 'show_counter' => true), 'likes' => array('show_do_vote_as_button' => false, 'show_do_vote_as_button_small' => false, 'show_do_vote_icon' => true, 'show_do_vote_label' => false, 'show_counter' => true));
     $this->_sTmplNameCounter = 'vote_counter.html';
     $this->_sTmplNameDoVoteLikes = 'vote_do_vote_likes.html';
     $this->_sTmplNameDoVoteStars = 'vote_do_vote_stars.html';
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:12,代码来源:BxBaseVote.php

示例6: _getContent

 protected function _getContent(&$aEvent)
 {
     $sHandler = $aEvent['type'] . '_' . $aEvent['action'];
     if (!$this->_oConfig->isHandler($sHandler)) {
         return array();
     }
     $aHandler = $this->_oConfig->getHandlers($sHandler);
     if (!empty($aHandler['module_name']) && !empty($aHandler['module_class']) && !empty($aHandler['module_method'])) {
         return BxDolService::call($aHandler['module_name'], $aHandler['module_method'], array($aEvent), $aHandler['module_class']);
     }
     $sMethod = 'display' . bx_gen_method_name($aHandler['alert_unit'] . '_' . $aHandler['alert_action']);
     if (!method_exists($this, $sMethod)) {
         return array();
     }
     return $this->{$sMethod}($aEvent);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:16,代码来源:BxNtfsTemplate.php

示例7: getVoting

 function getVoting($sType, $iObjectId = 0, $aParams = array())
 {
     $iMax = $this->getMaxVote();
     list($iSizeX, $iSizeY) = $this->_getSizeByType($sType);
     $iWidth = $iSizeX * $iMax;
     if (empty($iObjectId)) {
         $iObjectId = $this->getId();
     }
     $sHtmlId = $this->_sSystem . '_voting_' . $sType . '_' . $iObjectId;
     $sJsObject = bx_gen_method_name($sHtmlId);
     $sRet = '<div class="votes_' . $sType . '" id="' . $sHtmlId . '">';
     $iCanRate = !empty($aParams['can_rate']);
     if ($iCanRate) {
         $aJsParams = array('sSystem' => $this->_sSystem, 'iObjId' => $iObjectId, 'sBaseUrl' => BX_DOL_URL_ROOT, 'iSize' => $iSizeX, 'iMax' => $iMax, 'sHtmlId' => $sHtmlId);
         $sRet .= $GLOBALS['oSysTemplate']->_wrapInTagJsCode('var ' . $sJsObject . ' = new BxDolVoting(' . json_encode($aJsParams) . ');');
     }
     $sRet .= '<div class="votes_gray_' . $sType . '" style="width:' . $iWidth . 'px;">';
     // clickable/hoverable vote buttons
     if ($iCanRate) {
         $sRet .= '<div class="votes_buttons">';
         for ($i = 1; $i <= $iMax; ++$i) {
             $sRet .= '<a href="javascript:void(0);" onmouseover="' . $sJsObject . '.over(' . $i . ');" onmouseout="' . $sJsObject . '.out();" onclick="' . $sJsObject . '.vote(' . $i . ')"><i class="votes_button_' . $sType . ' sys-icon">&#61446;</i></a>';
         }
         $sRet .= '</div>';
     }
     // gray stars
     $sRet .= '<div class="votes_gray_' . $sType . '" style="width:' . $iWidth . 'px;">';
     for ($i = 1; $i <= $iMax; ++$i) {
         $sRet .= '<i class="votes_button_' . $sType . ' sys-icon star-o"></i>';
     }
     $sRet .= '</div>';
     // active stars
     $iVoteRate = !empty($aParams['override_rate']) ? (int) $aParams['override_rate'] : $this->getVoteRate();
     $sRet .= '<div class="votes_slider votes_active_' . $sType . '" style="width:' . round($iVoteRate * ($iMax ? $iWidth / $iMax : 0)) . 'px;">';
     for ($i = 1; $i <= $iMax; ++$i) {
         $sRet .= '<i class="votes_button_' . $sType . ' sys-icon star"></i>';
     }
     $sRet .= '</div>';
     $sRet .= '</div>';
     // vot count
     if (!empty($aParams['show_count'])) {
         $sRet .= '<span class="votes_count">' . _t('_n_votes', $this->getVoteCount()) . '</span>';
     }
     $sRet .= '<div class="clear_both"></div>';
     $sRet .= '</div>';
     return $sRet;
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:47,代码来源:BxBaseVotingView.php

示例8: saveChanges

 function saveChanges(&$oForm)
 {
     $aCategories = explode(',', $oForm->getCleanValue('categories'));
     foreach ($aCategories as $sCategory) {
         $aOptions = array();
         $iOptions = $this->oDb->getOptions(array('type' => 'by_category_name_full', 'value' => $sCategory), $aOptions);
         $aData = array();
         foreach ($aOptions as $aOption) {
             $aData[$aOption['name']] = $oForm->getCleanValue($aOption['name']);
             if (!empty($aOption['check'])) {
                 $sCheckerHelper = '';
                 if (!empty($aOption['type_name']) && BxDolRequest::serviceExists($aOption['type_name'], 'get_settings_checker_helper')) {
                     $sCheckerHelper = BxDolService::call($aOption['type_name'], 'get_settings_checker_helper');
                 }
                 if ($sCheckerHelper == '') {
                     bx_import('BxDolStudioForm');
                     $sCheckerHelper = 'BxDolStudioFormCheckerHelper';
                 }
                 $oChecker = new $sCheckerHelper();
                 $aCheckFunction = array($oChecker, 'check' . bx_gen_method_name($aOption['check']));
                 $aCheckFunctionParams = array($aData[$aOption['name']]);
                 if (!empty($aOption['check_params'])) {
                     $aCheckFunctionParams = array_merge($aCheckFunctionParams, unserialize($aOption['check_params']));
                 }
                 if (is_callable($aCheckFunction) && !call_user_func_array($aCheckFunction, $aCheckFunctionParams)) {
                     $this->sCategory = $sCategory;
                     return $this->getJsResult(_t('_adm_stg_err_save_error_message', _t($aOption['caption']), _t($aOption['check_error'])), false);
                 }
             }
             if (isset($aData[$aOption['name']])) {
                 $aData[$aOption['name']] = $this->getProcessedValue($aOption, $aData[$aOption['name']]);
             } else {
                 $aData[$aOption['name']] = $this->getEmptyValue($aOption);
             }
             if ($this->oDb->setParam($aOption['name'], $aData[$aOption['name']])) {
                 $aCategoryInfo = array();
                 $this->oDb->getCategories(array('type' => 'by_name', 'value' => $sCategory), $aCategoryInfo, false);
                 bx_alert('system', 'save_setting', 0, 0, array('category' => $aCategoryInfo, 'option' => $aOption['name'], 'value' => $aData[$aOption['name']]));
             }
         }
     }
     return $this->getJsResult('_adm_stg_scs_save');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:43,代码来源:BxDolStudioSettings.php

示例9: _getSystemData

 function _getSystemData(&$aEvent, $sDisplayType = BX_WALL_VIEW_TIMELINE)
 {
     $sHandler = $aEvent['type'] . '_' . $aEvent['action'];
     if (!$this->_oConfig->isHandler($sHandler)) {
         return array();
     }
     $aHandler = $this->_oConfig->getHandlers($sHandler);
     if (empty($aHandler['module_uri']) && empty($aHandler['module_class']) && empty($aHandler['module_method'])) {
         $sMethod = 'display' . bx_gen_method_name($aHandler['alert_unit'] . '_' . $aHandler['alert_action']);
         if (!method_exists($this, $sMethod)) {
             return array();
         }
         $aResult = $this->{$sMethod}($aEvent, $sDisplayType);
     } else {
         $aEvent['js_mode'] = $this->_oConfig->getJsMode();
         $aResult = $this->_oConfig->getSystemData($aEvent, $sDisplayType);
         if (isset($aResult['save'])) {
             $this->_oDb->updateEvent($aResult['save'], $aEvent['id']);
         }
     }
     return $aResult;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:22,代码来源:BxWallTemplate.php

示例10: bx_import

<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 *
 * @defgroup    DolphinCore Dolphin Core
 * @{
 */
require_once './inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
require_once BX_DIRECTORY_PATH_INC . "utils.inc.php";
bx_import('BxDolLanguages');
$sObject = bx_process_input(bx_get('o'));
if (!$sObject) {
    exit;
}
bx_import('BxDolGrid');
$oGrid = BxDolGrid::getObjectInstance($sObject);
if (!$oGrid) {
    // no such grid object available
    exit;
}
$sAction = 'performAction' . bx_gen_method_name(bx_process_input(bx_get('a')));
if (method_exists($oGrid, $sAction)) {
    $oGrid->{$sAction}();
}
/** @} */
开发者ID:blas-dmx,项目名称:trident,代码行数:28,代码来源:grid.php

示例11: getClassName

 public static function getClassName($sValue)
 {
     return bx_gen_method_name($sValue);
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:4,代码来源:BxDolStudioUtils.php

示例12: getCheckMethod

 protected function getCheckMethod($s)
 {
     if (substr($s, 0, 1) != '@') {
         return false;
     }
     return bx_gen_method_name(str_replace('@', 'check_', $s));
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:7,代码来源:BxDolPrivacy.php

示例13: _perform

 protected function _perform($sOperationName, $aParams = array())
 {
     $bHtmlResponce = isset($aParams['html_response']) && (bool) $aParams['html_response'];
     if (!defined('BX_SKIP_INSTALL_CHECK') && !defined('BX_DOL_CRON_EXECUTE') && !$GLOBALS['logged']['admin']) {
         return array('message' => '_adm_mod_err_only_admin_can_perform_operations_with_modules', 'result' => false);
     }
     $sMessage = '';
     foreach ($this->_aConfig[$sOperationName] as $sAction => $iEnabled) {
         $sMethod = 'action' . bx_gen_method_name($sAction);
         if ($iEnabled == 0 || !method_exists($this, $sMethod)) {
             continue;
         }
         $mixedResult = $this->{$sMethod}($sOperationName);
         //--- On Success ---//
         if (is_int($mixedResult) && (int) $mixedResult == BX_DOL_STUDIO_INSTALLER_SUCCESS || isset($mixedResult['code']) && (int) $mixedResult['code'] == BX_DOL_STUDIO_INSTALLER_SUCCESS) {
             $sMessage .= $this->_displayResult($sAction, true, isset($mixedResult['content']) ? $mixedResult['content'] : '', $bHtmlResponce);
             continue;
         }
         //--- On Failed ---//
         $sMethodFailed = $sMethod . 'Failed';
         return array('message' => $this->_displayResult($sAction, false, method_exists($this, $sMethodFailed) ? $this->{$sMethodFailed}($mixedResult) : $this->actionOperationFailed($mixedResult), $bHtmlResponce), 'result' => false);
     }
     if ($this->_bShowOnSuccess) {
         $sMessage = $this->_aActions['perform_' . $sOperationName]['success'] . $sMessage;
     }
     return array('message' => $sMessage, 'result' => true);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:27,代码来源:BxDolStudioInstaller.php

示例14: _getSystemData

 protected function _getSystemData(&$aEvent)
 {
     $mixedResult = $this->_oConfig->getSystemData($aEvent);
     if ($mixedResult !== false) {
         return $mixedResult;
     }
     $sMethod = 'display' . bx_gen_method_name($aEvent['type'] . '_' . $aEvent['action']);
     if (!method_exists($this, $sMethod)) {
         return '';
     }
     return $this->{$sMethod}($aEvent);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:12,代码来源:BxTimelineTemplate.php

示例15: _methodExists

 protected static function _methodExists($mixedModule, $sMethodType, $sMethodName, $sClass = "Module")
 {
     $aModule = $mixedModule;
     if (is_string($mixedModule)) {
         bx_import('BxDolModuleQuery');
         $aModule = BxDolModuleQuery::getInstance()->getModuleByName($mixedModule);
     }
     if (!$aModule) {
         return false;
     }
     $sClass = $aModule['class_prefix'] . $sClass;
     if (($oModule = BxDolRequest::_require($aModule, $sClass)) === false) {
         return false;
     }
     $sMethod = $sMethodType . bx_gen_method_name($sMethodName);
     return method_exists($oModule, $sMethod);
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:17,代码来源:BxDolRequest.php


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