Example #1
0
 /** Genera un log
  * @param object $serviceLocator
  * @param string $texto
  * @param string $terminal
  * @param string $usuario
  * @return object
  */
 public static function save($serviceLocator, $terminal, $tipo, $cod_operacion, $desc_operacion, $parametros, $texto, $usuario)
 {
     try {
         $log = new Log();
         $log->setTerminal($terminal);
         $log->setTipo($tipo);
         $log->setCodOperacion($cod_operacion);
         $log->setDescOperacion($desc_operacion);
         $log->setParametros($parametros);
         $log->setTexto($texto);
         $log->setUsuario($usuario);
         $log->setFecha(date("Y-m-d H:i:s"));
         $logDao = new LogDao($serviceLocator);
         if (!$logDao->save($log)) {
             return false;
         }
         return true;
     } catch (\Exception $e) {
         return $e->getMessage();
     }
 }
Example #2
0
 public function getAllObjectsAction()
 {
     $albumDao = new LogDao($this->_serviceLocator);
     $res = $albumDao->getAllObjects(array("texto" => "prueba"));
     var_dump($res);
     exit;
 }