承接 nigel/freescout-webhook-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nigel/freescout-webhook-parser

最新稳定版本:1.0.3

Composer 安装命令:

composer require nigel/freescout-webhook-parser

包简介

A PHP library for parsing FreeScout webhook data with HTML cleaning capabilities

README 文档

README

A PHP library for parsing FreeScout webhook data with HTML cleaning capabilities.

Features

  • Parse FreeScout webhook data
  • Clean HTML content using HtmlCleaner
  • Support for both basic and extended data fields
  • Easy to use interface
  • Type-safe data access

Installation

composer require nigel/freescout-webhook-parser

Usage

Basic Usage

use Nigel\FreescoutWebhookParser\FreeScoutWebhookParser;

// Get webhook data
$rawData = file_get_contents('php://input');

// Create parser instance
$parser = new FreeScoutWebhookParser($rawData);

// Parse the data
$result = $parser->parse();

// Get basic fields
$basicFields = $result->getBasicFields();

// Get all fields
$allFields = $result->getAllFields();

Basic Fields

The getBasicFields() method returns the most commonly used fields:

[
    'subject' => string,
    'body' => string,
    'from' => string,
    'to' => string,
    'date' => string,
    'type' => string,
    'status' => string,
    'customer' => [
        'name' => string,
        'email' => string
    ],
    'conversation_id' => string,
    'thread_id' => string
]

All Fields

The getAllFields() method returns all available fields:

[
    'subject' => string,
    'body' => string,
    'from' => string,
    'to' => string,
    'cc' => string,
    'bcc' => string,
    'date' => string,
    'message_id' => string,
    'in_reply_to' => string,
    'references' => string,
    'attachments' => array,
    'headers' => array,
    'custom_fields' => array,
    'conversation_id' => string,
    'thread_id' => string,
    'type' => string,
    'status' => string,
    'customer' => [
        'id' => string,
        'name' => string,
        'email' => string
    ],
    'mailbox' => [
        'id' => string,
        'name' => string
    ],
    'user' => [
        'id' => string,
        'name' => string,
        'email' => string
    ],
    'dates' => [
        'created_at' => string,
        'updated_at' => string,
        'deleted_at' => string
    ],
    'tags' => array,
    'custom_data' => array,
    'meta' => array
]

Requirements

  • PHP 8.0 or higher
  • Composer

License

This project is licensed under the MIT License - see the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固