oihana/php-nginx
最新稳定版本:0.0.1
Composer 安装命令:
composer require oihana/php-nginx
包简介
The Oihana PHP Nginx library
README 文档
README
PHP toolkit to create, modify, and control NGINX configurations and commands programmatically.
Built on top of the Oihana PHP Commands Library.
📦 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 pathsNginxSignal: Available Nginx process signalsRedirectDirection: Redirect direction options
Helpers
redirectBlock(): Generate redirect block configurations
Options
NginxOption: Individual Nginx option managementNginxOptions: 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2025-08-12
