自定义模块的配置说明
来源:互联网 发布:mac win7 共享文件夹 编辑:程序博客网 时间:2024/06/05 10:38
上一篇已经介绍了创建新模块的目录结构,下面就对config中的module.config.php配置文件进行介绍:
<?php/** * @todo 配置该模块的基本属性及MVC布局 *///配置文件return array( 'router' => array( 'routes' => array( 'home' => array( 'type' => 'Zend\Mvc\Router\Http\Literal', 'options' => array( 'route' => '/', 'defaults' => array( 'controller' => 'home\Controller\Index', 'action' => 'index', ), ), ), 'application' => array( 'type' => 'Literal', 'options' => array( 'route' => '/home', 'defaults' => array( '__NAMESPACE__' => 'home\Controller', 'controller' => 'Index', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'default' => array( 'type' => 'Segment', 'options' => array( 'route' => '/[:controller[/:action]]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( ), ), ), ), ), ), ), 'service_manager' => array( 'abstract_factories' => array( 'Zend\Cache\Service\StorageCacheAbstractServiceFactory', 'Zend\Log\LoggerAbstractServiceFactory', ), 'aliases' => array( 'translator' => 'MvcTranslator', ), ), 'translator' => array( 'locale' => 'zh_CN', 'translation_file_patterns' => array( array( 'type' => 'gettext', 'base_dir' => __DIR__ . '/../language', 'pattern' => '%s.mo', ), ), ), 'controllers' => array( 'invokables' => array( 'home\Controller\Index' => 'home\Controller\IndexController' ), ), 'view_manager' => array( 'display_not_found_reason' => true, 'display_exceptions' => true, 'doctype' => 'HTML5', 'not_found_template' => 'error/404', 'exception_template' => 'error/index', 'template_map' => array( 'layout/layout' => __DIR__ . '/../view/home/layout/layout.phtml', 'home/index/index' => __DIR__ . '/../view/home/index/index.phtml', 'home/index/home' => __DIR__ . '/../view/home/index/home.phtml', 'error/404' => __DIR__ . '/../view/home/error/404.phtml', 'error/index' => __DIR__ . '/../view/home/error/index.phtml', ), 'template_path_stack' => array( 'home' => __DIR__ . '/../view', ), ), 'console' => array( 'router' => array( 'routes' => array( ), ), ),);
上面是鄙人配置时使用的配置文件内容大家可以自己看下。
0 0
- 自定义模块的配置说明
- xdebug模块输出文件名的配置说明
- maven配置checkstyle检查的自定义模块
- dojoConfig配置自定义模块
- rsyncd - 模块常用配置说明
- Apache deflate模块配置说明
- mod_dosevasive模块安装及配置说明
- SEnginx安全相关模块配置说明
- 模块和它们的说明
- 项目模块的说明文章
- Razor模块的一些说明
- Python glob模块的说明
- AMD模块的写法说明
- apache加载模块的说明
- apache加载模块的说明
- QiYuAdmin-项目模块的说明
- JSP中自定义标签属性配置说明
- django10 使用自定义标签配置说明
- iOS7——隐藏状态栏
- asp.net为什么网页里面找不到CS文件
- FragmentTabHost + pageView 实现可左右滑动的底部菜单 ...
- java往txt文件中写内容
- Objective-C中的命名前缀说明 & 与C++的不同之处 &Modern Objective-C 基础知识
- 自定义模块的配置说明
- WINCE 音频驱动之一:分类
- 在tomcat下配置mysql的链接池步骤
- 第一次使用csdn的博客,记录一个小产品的开发过程
- hdu 1753 大明A+B(高精度小数加法)
- MD5加密算法实现
- Java中的小细节
- PyCharm常用快捷键
- 面向对象、面向过程的思考