github-aiko/php-virtualizor
Composer 安装命令:
composer require github-aiko/php-virtualizor
包简介
A Wrapper for the Virtualizor API
README 文档
README
🖥️ PHP Virtualizor API Wrapper
A modern, elegant PHP wrapper for the Virtualizor API
📋 Table of Contents
- ✨ Features
- 📦 Requirements
- 🚀 Installation
- ⚡ Quick Start
- 📖 API Reference
- 🧪 Development
- 🤝 Contributing
- 📄 License
✨ Features
| Feature | Description |
|---|---|
| 🖥️ Virtual Servers | Create, manage, start, stop, restart VPS instances |
| 💾 OS Templates | List and manage operating system templates |
| 🌐 IP Pool | Manage IP address pools and allocations |
| 👥 Users | User management and authentication |
| 🔒 Secure | Built-in API key authentication |
| ⚡ Modern PHP | Supports PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 |
📦 Requirements
- PHP >= 7.4
- ext-json extension
- Virtualizor panel with API access enabled
🚀 Installation
Install via Composer:
composer require github-aiko/php-virtualizor
⚡ Quick Start
Initialize the Client
<?php require 'vendor/autoload.php'; use Virtualizor\Virtualizor; // Initialize with your Virtualizor credentials $virtualizor = new Virtualizor( 'your-server-ip', // Server IP 'your-api-key', // API Key 'your-api-pass', // API Password '4085', // Admin Port (default: 4085) '4083' // Client Port (default: 4083) );
Virtual Server Management
// Get VirtualServer instance $server = $virtualizor->server(); // List all virtual servers $servers = $server->listAll(); // Get specific VPS info $vpsInfo = $server->info($vpsId); // Start/Stop/Restart VPS $server->start($vpsId); $server->stop($vpsId); $server->restart($vpsId);
OS Templates
// Get OS Templates instance $templates = $virtualizor->osTemplates(); // List all available templates $allTemplates = $templates->listAll();
IP Pool Management
// Get IP Pool instance $ipPool = $virtualizor->IPPool(); // List all IP pools $pools = $ipPool->listAll();
User Management
// Get Users instance $users = $virtualizor->Users(); // List all users $allUsers = $users->listAll();
📖 API Reference
Main Class: Virtualizor
| Method | Return Type | Description |
|---|---|---|
server() |
VirtualServer |
Virtual server operations |
osTemplates() |
OSTemplates |
OS template operations |
IPPool() |
IPPool |
IP pool operations |
Users() |
Users |
User management operations |
📚 Full Documentation: Virtualizor Admin API
🧪 Development
Running Tests
# Install dependencies composer install # Run PHPUnit tests vendor/bin/phpunit
CI/CD Pipeline
This project uses GitHub Actions for continuous integration:
| Check | Versions |
|---|---|
| 🧪 Unit Tests | PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 |
| ✅ Composer Validation | All versions |
| 📦 Auto Packagist Update | On release tags |
🤝 Contributing
Contributions are welcome! Here's how you can help:
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🔃 Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Github-Aiko
Based on VirtualizorPHP - completely recoded
github-aiko/php-virtualizor 适用场景与选型建议
github-aiko/php-virtualizor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「wrapper」 「Virtualization」 「virtualizor」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 github-aiko/php-virtualizor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 github-aiko/php-virtualizor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 github-aiko/php-virtualizor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple PHP 7+ Proxmox API client for VE and MG.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
A PSR-7 compatible library for making CRUD API endpoints
A simple PHP 5.5+ Proxmox API client.
A simple PHP 5.5+ Proxmox API client.
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-14