略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Yaf_Application::getModules

2024-05-02

Yaf_Application::getModules

(Yaf >=1.0.0)

Yaf_Application::getModules获取在配置文件中申明的模块

说明

public Yaf_Application::getModules(): array

获取在配置文件中声明的模块,如果没有声明,它的默认值将是"Index"。

参数

此函数没有参数。

返回值

范例

示例 #1 Yaf_Application::getModules()example

<?php
$config 
= array(
    
"application" => array(
        
"directory" => realpath(dirname(__FILE__)) . "/application",
    ),
);

/** Yaf_Application */
$application = new Yaf_Application($config);
print_r($application->getModules());
?>

以上例程的输出类似于:

Array
(
    [0] => Index
)
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/yaf-application.getmodules.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3