本文整理汇总了PHP中Modules::folders方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::folders方法的具体用法?PHP Modules::folders怎么用?PHP Modules::folders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules
的用法示例。
在下文中一共展示了Modules::folders方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: module_folders
/**
* Returns an array of the folders that modules are allowed to be stored in.
* These are set in *bonfire/application/third_party/MX/Modules.php*.
*
* @deprecated since 0.7.1 Use Modules::folders() instead.
*
* @return array The folders that modules are allowed to be stored in.
*/
function module_folders()
{
return Modules::folders();
}
示例2: list_modules
/**
* Returns a list of all modules in the system.
*
* @param bool $exclude_core Whether to exclude the Bonfire core modules.
*
* @return array A list of all modules in the system.
*/
public static function list_modules($exclude_core = false)
{
// Ensure the bcDirectoryMap function is available.
if (!function_exists('bcDirectoryMap')) {
get_instance()->load->helper('directory');
}
$map = array();
foreach (Modules::folders() as $folder) {
// If excluding core modules, skip the core module folder.
if ($exclude_core && stripos($folder, 'bonfire/modules') !== false) {
continue;
}
$dirs = bcDirectoryMap($folder, 1);
if (is_array($dirs)) {
$map = array_merge($map, $dirs);
}
}
$count = count($map);
if (!$count) {
return $map;
}
// Clean out any html or php files.
for ($i = 0; $i < $count; $i++) {
if (stripos($map[$i], '.html') !== false || stripos($map[$i], '.php') !== false) {
unset($map[$i]);
}
}
return $map;
}
示例3: list_modules
/**
* Returns a list of all modules in the system.
*
*
* @return array A list of all modules in the system.
*/
public static function list_modules()
{
// Ensure the directory_map function is available.
if (!function_exists('directory_map')) {
get_instance()->load->helper('directory');
}
$map = array();
foreach (Modules::folders() as $folder) {
$dirs = directory_map($folder, 1);
if (is_array($dirs)) {
$map = array_merge($map, $dirs);
}
}
$count = count($map);
if (!$count) {
return $map;
}
// Clean out any html or php files.
for ($i = 0; $i < $count; $i++) {
if (stripos($map[$i], '.html') !== FALSE || stripos($map[$i], '.php') !== FALSE) {
unset($map[$i]);
}
}
return $map;
}