MongoCake
CakePHP 2.0 plugin to bridge with Doctrine MongoDB ODM in order to use models as objects persisted by Doctrine. This changes the original CakePHP feature of returning arrays of results, and instead returns objects wich are cleaner to manage and extend.
Install / Use
/learn @lorenzo/MongoCakeREADME
Installation
Change into your Plugin directory, and checkout the git repo:
cd Plugin
git clone git://github.com/lorenzo/MongoCake.git
cd MongoCake
git submodule update --init --recursive
Configuration
You first need to activate the plugin in CakePHP after placing it in the correct folder:
CakePlugin::load('MongoCake', array('bootstrap' => true));
Use this MongoCake plugin like any other datasource, with its own configuration options:
// Within Config/database.php
public $default = array(
'datasource' => 'MongoCake.CakeMongoSource',
'server' => 'localhost', // Optional
'database' => 'mydatabase', // Database to use
);
Models
Ensure that your models extend the CakeDocument class.
class User extends CakeDocument {
}
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
