- General
- Articles
- Legacy
- Misc
- Third Party
- Plugins
- Frameworks
- Integration with Zend
- Integration with Code Igniter
- Integration with Kohana
- Who uses RedBeanPHP
- Personal
Integration with Zend
Integrating RedBean in the Zend Framework is easy. Just follow these steps.
1. Copy the Library
First, copy the RedBean folder to your Zend Library folder so that you can access RedBean using: library/RedBean You can also create a symlink if you like.
2. Configure
Now open your Zend bootstrap file and add:
public function run() {
$loader = Zend_Loader_Autoloader::getInstance()->registerNamespace("RedBean_");
require_once( APPLICATION_PATH . "/../library/RedBean/redbean.inc.php"); //or rb.php
R::setup( "mysql:host=localhost;dbname=timereg", "root" );
Zend_Registry::set("tools", R::$toolbox);
Zend_Registry::set("db", R::$adapter);
Zend_Registry::set("redbean", R::$redbean);
parent::run();
}
Your RedBean Toolbox can be retrieved using:
$toolbox = Zend_Registry::get("tools");
Tweet
User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.
Site comments powered by Disquspage generated in 0.0059900283813477 sec.