zend/zend-studio-development-mode

帮助使用 Zend Studio 开发 Zend Framework 2 应用的模块

1.0.2 2016-09-30 14:32 UTC

This package is auto-updated.

Last update: 2024-09-06 23:27:37 UTC


README

帮助使用 Zend Studio 开发 Zend Framework 应用的模块。

简介

此模块向 Zend Framework 应用程序添加以下配置

  • 向响应对象添加 Cache-Control: no-cache 标头,以避免在 Internet Explorer 中缓存。
  • 将 Android 4.x 设备发送的请求对象中的 Origin: file:// 标头更改为 Origin: file:///,以避免使用 ZfrCors 模块时出现故障。

注意

请不要 在生产系统中启用此模块。

安装

运行以下 composer 命令

$ composer require --dev "zend/zend-studio-development-mode:^1.0"

或者,手动将以下内容添加到您的 composer.json 文件中的 require 部分

"require-dev": {
    "zend/zend-studio-development-mode": "^1.0"
}

然后运行 composer update 以确保安装了模块。

最后,将模块名称添加到项目 config/development.config.php 文件下的 modules 键下

return array(
    /* ... */
    'modules' => array(
        /* ... */
        'ZendStudioDevelopmentMode',
    ),
    /* ... */
);

通常,此模块应与 zf-development-mode 一起使用,以便在您的应用程序中条件性地启用模块。这样做时,您将在项目的 config/development.config.php.dist 文件中添加模块,而不是在 config/application.config.php 文件中,并通过 php public/index.php development enable 启用它。