ksfraser/contact-dto
最新稳定版本:0.1.0
Composer 安装命令:
composer require ksfraser/contact-dto
包简介
Shared Contact Data Transfer Object for bank import parsers and CRM integration
关键字:
README 文档
README
A lightweight, self-contained Data Transfer Object for contact/payee information. Designed to be shared across multiple packages including bank import parsers (QIF, OFX, CSV) and CRM integrations.
Features
- Zero dependencies - Pure PHP, no external requirements
- PHP 7.3+ compatible - Works with legacy and modern PHP versions
- Normalized contact fields - Address broken into components, comprehensive contact details
- CRM-ready - Fields for linking to FrontAccounting customers/suppliers
- Parser-friendly - Methods for recording transaction statistics and populating from arrays
- Fully tested - Comprehensive PHPUnit test suite with 20+ test cases
Installation
composer require ksfraser/contact-dto
Quick Start
use Ksfraser\Contact\DTO\ContactData; $contact = new ContactData(); $contact->name = 'ACME Corp'; $contact->email = 'billing@acme.com'; $contact->phone = '555-0123'; $contact->contact_type = 'vendor'; // Record a transaction $contact->recordTransaction(150.00, '2023-06-15 10:30:00'); // Export to database $data = $contact->toArray();
Full Documentation
See README.md for comprehensive documentation including:
- Detailed usage examples
- All available methods
- Property reference
- Testing instructions
Testing
Run the test suite:
composer install --dev vendor/bin/phpunit
Development Environment
- PHP: 7.3+ (production), 8.x (development/testing)
- PHPUnit: 11 (dev-only)
License
MIT
Repository
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-20