public function setSource($model, $table = null)
{
if (!$table) {
$table = $model->table;
}
if (@(!$this->app->mongoclient)) {
$m = new MongoClient($this->app->getConfig('mongo/url', null));
$db = $this->app->getConfig('mongo/db');
$this->app->mongoclient = $m->{$db};
}
parent::setSource($model, array('db' => $this->app->mongoclient->{$table}, 'conditions' => array(), 'collection' => $table));
$model->addMethod('incr,decr', $this);
//$model->data=$model->_table[$this->short_name]['db']->get($id);
}