PHPackages                             wabel/zoho-crm-orm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wabel/zoho-crm-orm

ActiveLibrary[Database &amp; ORM](/categories/database)

wabel/zoho-crm-orm
==================

An ORM like package used to manipulate data from your Zoho CRM Account through the API.

2.2.x-dev(6y ago)728.8k17[5 issues](https://github.com/Wabel/zoho-crm-orm/issues)[1 PRs](https://github.com/Wabel/zoho-crm-orm/pulls)2PHPPHP &gt;=7.1

Since Apr 25Pushed 6y ago3 watchersCompare

[ Source](https://github.com/Wabel/zoho-crm-orm)[ Packagist](https://packagist.org/packages/wabel/zoho-crm-orm)[ Docs](http://mouf-php.com)[ RSS](/packages/wabel-zoho-crm-orm/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelogDependencies (6)Versions (10)Used By (2)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/35021a7648d666f76b8e7da9b803064245412d594ca1f8be01645a7fde5508ae/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f576162656c2f7a6f686f2d63726d2d6f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d312e32)](https://scrutinizer-ci.com/g/Wabel/zoho-crm-orm/?branch=1.2)[![Build Status](https://camo.githubusercontent.com/89aa8f1b69f870b21e835f1e38373c69c5258ef03c36cdcf5aeb910463690019/68747470733a2f2f7472617669732d63692e6f72672f576162656c2f7a6f686f2d63726d2d6f726d2e7376673f6272616e63683d312e32)](https://travis-ci.org/Wabel/zoho-crm-orm)[![Coverage Status](https://camo.githubusercontent.com/9b3d3c9ff890599c9a0f605c0fc69a3d19625baf07b2f747184220a59b2e7811/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f576162656c2f7a6f686f2d63726d2d6f726d2f62616467652e7376673f6272616e63683d312e32)](https://coveralls.io/r/Wabel/zoho-crm-orm?branch=1.2)

Wabel's Zoho-CRM ORM
====================

[](#wabels-zoho-crm-orm)

Heavily forked from [mctekk's work](https://github.com/mctekk/zohocrm)

What is this?
-------------

[](#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?
------------------------------------------

[](#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?
---------------

[](#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($configuration, 'Europe/Paris');

// 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();
}

// Get Records from the dao
$contactDao->getRecords()
```

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?
-------------------------------------

[](#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);
```

Targetting the correct Zoho API
-------------------------------

[](#targetting-the-correct-zoho-api)

Out of the box, the client will point to the `https://crm.zoho.com/crm/private` endpoint. If your endpoint is different (some users are pointing to `https://crm.zoho.eu/crm/private`), you can use the third parameter of the `Client` constructor:

```
$zohoClient = new ZohoClient([
    'client_id' => 'xxxxxxxxxxxxxxxxxxxxxx',
     'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'redirect_uri' => 'http://xxxxxxxxx.com/bakcxxxx',
    'currentUserEmail' => 'xxxxx@test.fr',
    'applicationLogFilePath' => '/xxx/xxx/',
    'sandbox' => true or false,
    'apiBaseUrl' => '',
    'apiVersion' => '',
    'access_type' => '',
    'accounts_url' => '',
    'persistence_handler_class' => '',
    'token_persistence_path' => ''
], 'Europe/Paris);
```

Setting up unit tests
---------------------

[](#setting-up-unit-tests)

Interested in contributing? You can easily set up the unit tests environment: Read how to change the client configuration - read [Configuration](https://github.com/zoho/zcrm-php-sdk)

- copy the `phpunit.xml.dist` file into `phpunit.xml`
- change the stored environment variable `client_secret`
- change the stored environment variable `redirect_uri`
- change the stored environment variable `currentUserEmail`
- change the stored environment variable `applicationLogFilePath`
- change the stored environment variable `persistence_handler_class`
- change the stored environment variable `token_persistence_path`
- change the stored environment variable `userid_test`
- change the stored environment variable `timeZone`
- change the stored environment variable `custom_module_singular_name`
- change the stored environment variable `custom_module_mandatory_field_name`
- change the stored environment variable `custom_module_picklist_field_name`
- change the stored environment variable `custom_module_picklist_field_value1`
- change the stored environment variable `custom_module_picklist_field_value2`
- change the stored environment variable `custom_module_date_field_name`
- change the stored environment variable `custom_module_text_field_name`

TODO
----

[](#todo)

Implement searchRecords()

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance6

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~118 days

Recently: every ~59 days

Total

10

Last Release

2246d ago

Major Versions

1.2.x-dev → 2.0.x-dev2019-03-17

PHP version history (3 changes)1.0.x-devPHP &gt;=5.4

1.1.x-devPHP &gt;=5.5

1.2.x-devPHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5702056?v=4)[WizMik](/maintainers/WizMik)[@WizMik](https://github.com/WizMik)

![](https://www.gravatar.com/avatar/73dd84a4da5bc50dbe771f9ec430f3b99fbb970469e29936baa1b6186b6c58d8?d=identicon)[max.prudhomme](/maintainers/max.prudhomme)

![](https://www.gravatar.com/avatar/a005a58c06dc4423865de3b88867c672d428c4a13686ed264426aead313d6c94?d=identicon)[Wabel](/maintainers/Wabel)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (74 commits)")[![WizMik](https://avatars.githubusercontent.com/u/5702056?v=4)](https://github.com/WizMik "WizMik (27 commits)")[![rbergDrox](https://avatars.githubusercontent.com/u/11984931?v=4)](https://github.com/rbergDrox "rbergDrox (23 commits)")[![andreychirikba](https://avatars.githubusercontent.com/u/30152071?v=4)](https://github.com/andreychirikba "andreychirikba (9 commits)")[![jweber018](https://avatars.githubusercontent.com/u/17851772?v=4)](https://github.com/jweber018 "jweber018 (1 commits)")[![dsavina](https://avatars.githubusercontent.com/u/22031211?v=4)](https://github.com/dsavina "dsavina (1 commits)")[![GDesclaux](https://avatars.githubusercontent.com/u/9569613?v=4)](https://github.com/GDesclaux "GDesclaux (1 commits)")

---

Tags

ormZohoZoho CRMZohoCRM

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wabel-zoho-crm-orm/health.svg)

```
[![Health](https://phpackages.com/badges/wabel-zoho-crm-orm/health.svg)](https://phpackages.com/packages/wabel-zoho-crm-orm)
```

###  Alternatives

[propel/propel

Propel2 is an open-source Object-Relational Mapping (ORM) for PHP.

1.3k5.3M110](/packages/propel-propel)[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[theofidry/alice-data-fixtures

Nelmio alice extension to persist the loaded fixtures.

32528.5M70](/packages/theofidry-alice-data-fixtures)[directorytree/ldaprecord

A fully-featured LDAP ORM.

5782.9M10](/packages/directorytree-ldaprecord)[topthink/think-orm

the PHP Database&amp;ORM Framework

4542.0M218](/packages/topthink-think-orm)[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
