In this first of a serious of articles where we delve into some of the hidden treasures in our ViMbAdmin application, we look at how to integrate Doctrine ORM with Zend – and specifically Zend_Application and Zend_Controller.
In this article we delve into our ViMbAdmin application and we look at how to integrate Doctrine ORM with Zend – and specifically Zend_Application and Zend_Controller.
The first assumption (and requirement) we are going to make is that you are using Zend_Application. If you want to see a working application set up and configured for this, please checkout or browse our ViMbAdmin source code – which we’ll reference throughout this document.
Zend Application has a resource framework which allows us to bootstrap various resources on demand. We have created a Doctrine resource for this very purpose which you can download from here (and you may need to edit the class name and change the plugin path in the config code below to match your setup). Our implementation does many things:
- instantiates the Doctrine object;
- sets up an autoloader for Doctrine models;
- instantiates the Doctrine manager;
- opens the connection to the database;
- sets all collations and character sets to UTF8 (this is hard coded but can easily be changed);
- sets various hard coded Doctrine attributes which can also be changed.
We the add various configuration parameters to the
Or the following where $application is the instance of Zend_Application:
$application->getBootstrap()->bootstrap( 'doctrine' );
From that, you can use Doctrine to your hearts content!
We also have a Doctrine CLI script which works from the same resource. See:
Open Solutions are pleased to announce the immediate availability of our latest free and open source web application, ViMbAdmin, a web based interface which will allow you to manage mailboxes, virtual domains and aliases.
Open Solutions are pleased to announce the immediate availability of our latest free and open source web application, ViMbAdmin (vim-be-admin). ViMbAdmin is a web based interface which will allow you to manage mailboxes, virtual domains and aliases.
ViMbAdmin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, or (at your option) any later version.
ViMbAdmin was entirely funded by Open Solutions and developed by our staff. If you find this application of value, please consider making a donation to our chosen charity.
Do you want to see it in action? We have a live demo which you can access here. You can also browse screenshots by clicking the image on this page.
ViMbAdmin was written in PHP using our own web application framework which includes the Zend Framework, the Doctrine ORM and the Smarty templating system with JQuery on the frontend.
ViMbAdmin is hosted on its own Google Code project page where you can find documentation, browse the source code and access our Subversion repository. We have set up a Google Groups discussion group and you can read our ViMbAdmin blog posts.
ViMbAdmin can work as a slot in replacement for Postfix Admin with a few MySQL ALTER statements.
- Super admin(s) user level with full access;
- Admin(s) user level with access only to assigned domains and their mailboxes and aliases;
- Super admins can create and modify super admins and admins;
- JQuery Datatable throughout for quick in browser searching and pagination;
- Create, modify and purge domains including limited the number of mailboxes and aliases a non-super admin can create per-domain;
- Activate / deactivate admins, domains, mailboxes and aliases at the click of a button;
- Full logging;
- Facility for users (mailbox owners) to change their password;
- Forgotten Password / Password Reset function for admins;
- Very configurable including:
- set default values for quotas, number of mailboxes and aliases for domain creation;
- templated welcome and settings email for users;
- either plain or MD5 mailbox password support;