定制 lionsmantle/supportboard-client 二次开发

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

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

lionsmantle/supportboard-client

Composer 安装命令:

composer require lionsmantle/supportboard-client

包简介

A PHP library providing an abstraction layer for SupportBoard PHP functions, designed for WordPress plugin integration

README 文档

README

A PHP library providing an abstraction layer for SupportBoard PHP functions, designed for WordPress plugin integration.

Features

  • Clean OOP Interface: Wraps SupportBoard's function-based API in service classes
  • WordPress Integration: Designed specifically for WordPress plugin development
  • Comprehensive Testing: Unit and integration tests with mocking capabilities
  • Error Handling: Standardized responses and exception hierarchy
  • Type Safety: Full type hints and return type declarations

Requirements

  • PHP 7.4 or higher
  • WordPress 5.0 or higher
  • SupportBoard 3.8.2 or compatible

Installation

composer require lionsmantle/supportboard-client

Quick Start

use LionsMantle\SupportBoardClient\SupportBoardClient;

// Initialize the client
$client = new SupportBoardClient();

// Get user by ID
$userService = $client->users();
$response = $userService->getUser(123);

if ($response->success) {
    $user = $response->data;
    echo "User: " . $user['first_name'] . ' ' . $user['last_name'];
} else {
    echo "Error: " . $response->error;
}

// Get user by email (new!)
$response = $userService->getUserByEmail('john@example.com');
if ($response->success) {
    $user = $response->data;
    echo "Found user: " . $user['email'];
}

Services

  • UserService: User management (get by ID/email, create, authenticate)
  • ConversationService: Conversation handling
  • MessageService: Message operations
  • AdminService: Admin and agent functions
  • SettingsService: Configuration management
  • DatabaseService: Database operations
  • LanguageService: Translation functions

Testing

# Run all tests
composer test

# Run unit tests only
composer test:unit

# Run with coverage
composer test:coverage

Code Quality

# Check coding standards
composer lint

# Fix coding standards
composer lint:fix

# Run static analysis
composer analyze

License

MIT License. See LICENSE file for details.

Contributing

Please see CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-12