PHPackages                             the-cure/the-cure - 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. the-cure/the-cure

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

the-cure/the-cure
=================

A data mapper with minimal impact on your domain logic.

v0.2.1(13y ago)6381MITPHPPHP &gt;=5.3.0

Since May 17Pushed 13y ago3 watchersCompare

[ Source](https://github.com/Gignite/the-cure)[ Packagist](https://packagist.org/packages/the-cure/the-cure)[ Docs](https://github.com/Gignite/the-cure)[ RSS](/packages/the-cure-the-cure/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependenciesVersions (8)Used By (0)

The cure
========

[](#the-cure)

A data mapper library with a minimal impact on your domain logic. In plainer terms, a library for writing the models of your PHP application, mapping them to data stores such as MongoDB and unit testing against mock data stores.

This library came about from a number of previous interations including [beautiful/domain](https://github.com/beautiful/domain)and the frustrations of unit testing the active record pattern.

Written in PHP and must be used with 5.3 or later. The tests require the Kohana 3.3 framework for autoloading classes and configuration management. *Kohana is included as a submodule.*

Installation
------------

[](#installation)

The cure is available as a [composer](http://getcomposer.com) package so you can add it as a dependency.

```
{
	"require": {
		"php": ">=5.3.2",
		"the-cure/the-cure": ">=0.2.1"
	}
}
```

Alternatively you can download the latest zip from github:

[The cure v0.2.1](https://github.com/Gignite/the-cure/zipball/v0.2.1)

Ingredients
-----------

[](#ingredients)

Before we go into that CRUD stuff let's explain a few ingredients of the cure.

### Models

[](#models)

In the cure we use a class known as a model to describe domain logic. Your models in your application will represent users, blog posts, spaceships or anything that concerns yours or your bosses business.

The cure provides two base models. Here is an example of the second, more ORM like model, `TheCure\Models\Magic`:

```
