定制 oihana/php-nginx 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oihana/php-nginx

最新稳定版本:0.0.1

Composer 安装命令:

composer require oihana/php-nginx

包简介

The Oihana PHP Nginx library

README 文档

README

Oihana PHP Nginx

PHP toolkit to create, modify, and control NGINX configurations and commands programmatically.

Built on top of the Oihana PHP Commands Library.

Latest Version
Total Downloads
License

📦 Installation

Requires PHP 8.4+

Install via Composer:

composer require oihana/php-nginx

📚 Usage

Configuration Management

The library provides comprehensive tools for managing Nginx configurations:

  • Path Management: Handle different Nginx configuration paths
  • Signal Control: Send signals to Nginx processes
  • Redirect Management: Create and manage redirect blocks
  • Options Configuration: Configure Nginx options programmatically

Enums

  • NginxPath: Defines standard Nginx configuration paths
  • NginxSignal: Available Nginx process signals
  • RedirectDirection: Redirect direction options

Helpers

  • redirectBlock(): Generate redirect block configurations

Options

  • NginxOption: Individual Nginx option management
  • NginxOptions: Collection of Nginx options

🧪 Testing

To run all tests:

composer test

📖 Documentation

For detailed documentation, please refer to the source code and test files in the src/ and tests/ directories.

Project Structure

src/oihana/nginx/
├── enums/           # Nginx-related enumerations
├── helpers/         # Helper functions
├── options/         # Configuration options
└── traits/          # Reusable traits

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

🔗 Dependencies

This library is built on top of the Oihana PHP Framework and includes the following core dependencies:

Core Framework Dependencies

  • oihana/php-core: Core framework functionality
  • oihana/php-reflect: Reflection utilities
  • oihana/php-enums: Enumeration support
  • oihana/php-schema: Schema validation
  • oihana/php-standards: Coding standards and utilities
  • oihana/php-files: File system operations
  • oihana/php-system: System-level operations
  • oihana/php-commands: Command-line interface framework

Development Dependencies

  • phpunit/phpunit: Unit testing framework
  • nunomaduro/collision: Error reporting for console applications
  • mikey179/vfsstream: Virtual file system for testing
  • phpdocumentor/shim: Documentation generation support

All framework dependencies are currently using the dev-main branch for development purposes (alpha version).

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2025-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固