本文整理汇总了PHP中Modules::getModule方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::getModule方法的具体用法?PHP Modules::getModule怎么用?PHP Modules::getModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules
的用法示例。
在下文中一共展示了Modules::getModule方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* Welcome page that lists the available mythweb sections
*
* @license GPL
*
* @package MythWeb
*
**/
// Default requested view
if (empty($_REQUEST['view_module']) || !Modules::getModule($_REQUEST['view_module'])) {
$_REQUEST['view_module'] = 'tv';
}
// Not really much to do here but print the list of modules
require 'modules/_shared/tmpl/' . tmpl . '/welcome.php';
示例2: t
echo t('Recommended Programs');
?>
</a>
|
<?php
}
?>
<?php
}
?>
<a href="status"><?php
echo t('Backend Status');
?>
</a>
<?php
if (Modules::getModule('backend_log')) {
?>
|
<a href="backend_log"><?php
echo t('Backend Logs');
?>
</a>
<?php
}
?>
</div></td>
</tr>
</table></td>
</tr>
</table>
示例3: ini_set
*
* @package MythWeb
*
**/
// Add a custom include path?
if (!empty($_SERVER['include_path']) && $_SERVER['include_path'] != '.') {
ini_set('include_path', $_SERVER['include_path'] . PATH_SEPARATOR . ini_get('include_path'));
}
// Path to the MythTV bindings that are now installed by the MythTV package
ini_set('include_path', '/usr/local/share/mythtv/bindings/php/' . PATH_SEPARATOR . '/usr/share/mythtv/bindings/php/' . PATH_SEPARATOR . ini_get('include_path'));
// Init
require_once 'includes/init.php';
// Handle Feed requests
if ($Path[0] == 'rss' || $Path[0] == 'ical') {
unset($Path[0]);
$Path = array_values($Path);
}
// Standard module? Pass along the
if (Modules::getModule($Path[0])) {
// Add the current module directory to our search path, so modules can
// define includes, etc.
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . modules_path . '/' . $Path[0]);
// Load the module handler
require_once 'handler.php';
} elseif ($Path[0] == 'dcss') {
include_once 'skins/default/' . $Path[1];
} elseif (!empty($Path[0]) && preg_match('/\\w/', $Path[0])) {
tailored_error('unknown_module');
} else {
require_once 'modules/welcome.php';
}