ziack/zoho-crm-orm
Composer 安装命令:
composer require ziack/zoho-crm-orm
包简介
An ORM like package used to manipulate data from your Zoho CRM Account through the API.
README 文档
README
Wabel's Zoho-CRM ORM
Heavily forked from mctekk's work
What is this?
This project is a PHP connector to Zoho CRM. Use this connector to access ZohoCRM data from your PHP application.
Who is it different from other connectors?
Unlike other Zoho CRM clients, the Zoho-CRM ORM uses a code generator to generate Beans and DAOs to easily access Zoho objects from PHP.
Beans and DAOs?
A small bit of code is better than a long phrase, here you go with a sample:
use \Wabel\Zoho\CRM\ZohoClient; // The ZohoClient class is the low level class used to access Zoho. $zohoClient = new ZohoClient($zohoAuthToken); // Use the "DAO" class to write to some module of Zoho. // Each module (even custom ones) has its own class. $contactZohoDao = new ContactZohoDao($zohoClient); // For each DAO, there is a bean associated. $contact = new Contact(); $contact->setLastName("Doe"); $contact->setFirstName("John"); // Use the "save" method to save the bean. $contactDao->save($contact); // Use the "searchRecords" method to fetch data from Zoho. $records = $contactDao->searchRecords("(Last Name:FooBar)"); foreach ($records as $record) { // Each record is a "Contact" object. echo $record->getLastName(); }
What you must always remember:
- Beans are used to map records in Zoho. There is one class per Zoho module
- DAOs are used to send beans to Zoho. There is one DAO per Zoho module
But how do I generate Beans and DAOs?
There are several techniques.
Using pure PHP code:
use \Wabel\Zoho\CRM\ZohoClient; // The ZohoClient class is the low level class used to access Zoho. $zohoClient = new ZohoClient($zohoAuthToken); // The EntitiesGeneratorService class is in charge of generating Beans and DAOs. $entitiesGenerator = new EntitiesGeneratorService($client); // The target directory we will write into. $directory = __DIR__.'/src/TestNamespace/'; // The namespace for the beans and DAOs. $namespace = 'TestNamespace'; // That returns an array containing each created Dao by using the fully qualified class name $generator->generateAll($directory, $namespace);
Setting up unit tests
Interested in contributing? You can easily set up the unit tests environment:
- copy the
phpunit.xml.distfile intophpunit.xml - change the stored
auth_token - run the tests:
vendor/bin/phpunit
Troubleshooting
- I'm saving a bean (using the
savemethod of the DAO) and searching for it afterwards (usingsearchRecords). The bean is not returned.
This is a Zoho issue. Zoho takes about one minute to index the records you insert. So you must wait about one minute before the Zoho bean you saved will be findable using thesearchRecordsmethod.
ziack/zoho-crm-orm 适用场景与选型建议
ziack/zoho-crm-orm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 59 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 08 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「orm」 「Zoho CRM」 「Zoho」 「ZohoCRM」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ziack/zoho-crm-orm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ziack/zoho-crm-orm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ziack/zoho-crm-orm 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP client for the Salesforce SOAP API
Kinikit - PHP Application development framework MVC component
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
This package contains code to help you copy ZohoCRM records directly into your database.
Command-line utility for Vtiger CRM.
Zoho Sign v1 API PHP Wrapper - PHP 7.4 Ready
统计信息
- 总下载量: 59
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-08-30