承接 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).

统计信息

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

GitHub 信息

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

其他信息

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