In my controller:
$dataSource = $this->getDataSource();
$dataSource->begin($this);
if(...){
$dataSource->commit($this);
}else{
$dataSource->rollback($this);
}
but does not work, I get the following error:
Fatal error: calling the undefined method AppusuariosController :: getDataSource () in C: ... \ app \ controllers \ appusuarios_controller.php on line 141
Do I need to import getDataSource ()?
source
share