定制 krazzer/directadmin 二次开发

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

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

krazzer/directadmin

Composer 安装命令:

composer require krazzer/directadmin

包简介

PHP client library to manage DirectAdmin control panel servers.

README 文档

README

Build Status Coverage Status Scrutinizer SensioLabs Insight GitHub license

This package is no longer supported by the original authors as we no longer use DirectAdmin. The library still worked fine when we left it, use at your own risk. If you want to take over just push your fork to Packagist, it's MIT all the way.

This is a PHP client library to manage DirectAdmin control panel servers. We simply decided to develop this as we needed automation of our own DirectAdmin servers, and the existing implementations were unsupported and incomplete.

API documentation for this project is automatically generated on each push.

Installation

Packagist Packagist

The recommended way to install this library is through Composer:

composer require omines/directadmin

If you're not familiar with composer follow the installation instructions for Linux/Unix/Mac or Windows, and then read the basic usage introduction.

Dependencies

The library uses Guzzle 6 as its HTTP communication layer. PHP versions supported are 5.6, 7.0, 7.1 and hhvm.

Basic usage

To set up the connection use one of the base functions:

use Omines\DirectAdmin\DirectAdmin;

$adminContext = DirectAdmin::connectAdmin('http://hostname:2222', 'admin', 'pass');
$resellerContext = DirectAdmin::connectReseller('http://hostname:2222', 'reseller', 'pass');
$userContext = DirectAdmin::connectUser('http://hostname:2222', 'user', 'pass');

These functions return an AdminContext, ResellerContext, and UserContext respectively exposing the functionality available at the given level. All three extend eachother as DirectAdmin uses a strict is-a model. To act on behalf of a user you can use impersonation calls:

$resellerContext = $adminContext->impersonateReseller($resellerName);
$userContext = $resellerContext->impersonateUser($userName);

Both are essentially the same but mapped to the correct return type. Impersonation is also done implicitly when managing a user's domains:

$domain = $adminContext->getUser('user')->getDomain('example.tld');

This returns, if the domain exists, a Domain instance in the context of its owning user, allowing you to manage its email accounts et al transparently.

Contributions

As the DirectAdmin API keeps expanding pull requests are welcomed, as are requests for specific functionality. Pull requests should in general include proper unit tests for the implemented or corrected functions.

For more information about unit testing see the README.md in the tests folder.

Legal

This software was developed for internal use at Omines Full Service Internetbureau in Eindhoven, the Netherlands. It is shared with the general public under the permissive MIT license, without any guarantee of fitness for any particular purpose. Refer to the included LICENSE file for more details.

The project is not in any way affiliated with JBMC Software or its employees.

krazzer/directadmin 适用场景与选型建议

krazzer/directadmin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 664 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「library」 「directadmin」 「control panel」 「direct admin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 krazzer/directadmin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 krazzer/directadmin 我们能提供哪些服务?
定制开发 / 二次开发

基于 krazzer/directadmin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-03