本文整理汇总了PHP中XoopsBlock::get方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsBlock::get方法的具体用法?PHP XoopsBlock::get怎么用?PHP XoopsBlock::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsBlock
的用法示例。
在下文中一共展示了XoopsBlock::get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlock
/**
* get block.
*
* @param Legacy_AbstractBlockProcedure &$obj
* @param XoopsBlock $block
*/
public static function getBlock(&$obj, $block)
{
$moduleHandler =& xoops_gethandler('module');
$module =& $moduleHandler->get($block->get('mid'));
if (is_object($module) && $module->getInfo('trust_dirname') == COSMOAPI_TRUST_DIRNAME) {
require_once XOOPS_TRUST_PATH . '/modules/' . COSMOAPI_TRUST_DIRNAME . '/blocks/' . $block->get('func_file');
$className = ucfirst(COSMOAPI_TRUST_DIRNAME) . '_' . substr($block->get('show_func'), 4);
$obj = new $className($block);
}
}
示例2: getBlock
/**
* getBlock
*
* @param Legacy_AbstractBlockProcedure &$obj
* @param XoopsBlock $block
*
* @return void
**/
public static function getBlock(&$obj, $block)
{
$moduleHandler =& Xcforum_Utils::getXoopsHandler('module');
$module =& $moduleHandler->get($block->get('mid'));
if (is_object($module) && $module->getInfo('trust_dirname') == 'xcforum') {
require_once XCFORUM_TRUST_PATH . '/blocks/' . $block->get('func_file');
$className = 'Xcforum_' . substr($block->get('show_func'), 4);
$obj = new $className($block);
}
}
示例3: CriteriaCompo
/**
* @private
* Uninstalls the block template data specified by $block of $module.
* @param XoopsBlock $block
* @param XoopsModule $module This object is must the module which has $block.
* @param string $tplset A name of the template set. If this is null, uninstalls
* all templates of any template-sets.
* @param $log
* @remarks
* This method users template handlers of the kernel. But, if they are hooked,
* they may not do something. So, abstraction mechanism is possible enough.
*/
function _uninstallBlockTemplate(&$block, &$module, $tplset, &$log)
{
$handler =& xoops_gethandler('tplfile');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('tpl_refid', $block->get('bid')));
$criteria->add(new Criteria('tpl_file', $block->get('template')));
$criteria->add(new Criteria('tpl_module', $module->get('dirname')));
$criteria->add(new Criteria('tpl_type', 'block'));
if ($tplset != null) {
// See 'FIXME'
$criteria->add(new Criteria('tpl_tplset', $tplset));
}
$handler->deleteAll($criteria);
}
示例4: getCacheFilePath
/**
* Gets a file path of a cache file for module contents.
* @param Legacy_BlockCacheInformation $cacheInfo
* @return string
*/
function getCacheFilePath()
{
$filepath = null;
$this->mGetCacheFilePath->call(new XCube_Ref($filepath), $this);
if (!$filepath) {
$id = md5(XOOPS_SALT . '(' . implode('_', $this->mIdentityArr) . ')' . implode('_', $this->mGroupArr));
$filepath = $this->getCacheFileBase($this->mBlock->get('bid'), $id);
}
return $filepath;
}
示例5: getWeight
function getWeight()
{
return $this->_mBlock->get('weight');
}
示例6: getCacheFilePath
/**
* Gets a file path of a cache file for module contents.
* @param Legacy_BlockCacheInformation $cacheInfo
* @return string
*/
function getCacheFilePath()
{
$filepath = null;
$this->mGetCacheFilePath->call(new XCube_Ref($filepath), $this);
if (!$filepath) {
$id = md5(XOOPS_SALT . "(" . implode("_", $this->mIdentityArr) . ")" . implode("_", $this->mGroupArr));
$filepath = XOOPS_CACHE_PATH . "/bid" . $this->mBlock->get('bid') . '_' . $id . ".cache.html";
}
return $filepath;
}