jeDbCheckPlugin plugin
Overview
This plugin provides a framework to help you write and run sanity check on your database.
This plugins is in fact a single task which call the sanity check functions
you define in your models and tables.
As a rule of thumb, if your sanity check is related to a single instance of a model, then you define it in the
model class. But if it is related to several instances of this model, then you define it in the Table class.
It is up to you to decide, the plugin will call what you defined, wherever it is.
Here is an example of a callback function
public function jeDbCheckCallback(){
/* insert your sanity check code here */
/* note: this is not a static function, so $this is an instance
of the current class */
}
If you want to log something inside this function use
jeDbCheck::log_info("the message to log");
If you want to notify an error, throw an exception
throw new jeDbCheckException('Something failed');
Installation
To install jeDbCheckPlugin:
./symfony plugin-install jeDbCheckPlugin
or
svn co http://svn.symfony-project.com/plugins/jeDbCheckPlugin plugins/jeDbCheckPlugin
Clear your cache
./symfony cc
You're done!
Usage
To check the configuration of the host:
./symfony jeDbCheck
Change Log
License
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.