Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A CouchDB datasource for CakePHP

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 models
Octocat-spinner-32 tests
Octocat-spinner-32 README.markdown


Divan is a CakePHP DataSource for the wonderful document-oriented database, CouchDB.


You'll need a toasty copy of CouchDB (tested with 0.9.0), and PHP 5.2 or greater for some json_(encode|decode) goodness. I'm sure you could cheat and use a lower version of PHP5 and some funky library to do the same thing, but nobody likes a cheater.


In CakePHP 1.2, datasources don't get any plugin-love - it's currently impossible to load a datasource included in a plugin into your main application. I know, it's sad. I cried a little.

Luckily, we're planning on fixing that in 1.3 (gotta earn that money all you guys cloning this DataSource are paying me), and Divan will then feel the warm embrace of it's formerly scorned lover, Plugin.

Until then, there is no un-hacky way to get Divan to work in it's current plugin-esque incantation. You will need either symlinks, copy/paste-fu, or perhaps some Mayan shaman tricks sprinkled with some good ol' black magic to get things to work. But don't worry, that's pretty much how I'm doing it right now. And if I'm doing it, then it must be right, right*?

*: I should really invent a shorthand for that end-of-sentence structure. Maybe [right]^2? Hopefully that wont anger the grammar police enough for me to end up in the trunk of their unmarked dictionary van.

Something went wrong with that request. Please try again.