Przeglądaj źródła

added business transact method

develop
Robin Thoni 8 lat temu
rodzic
commit
fe848d4e56
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9
    0
      src/Utils/Business/LuBusiness.php

+ 9
- 0
src/Utils/Business/LuBusiness.php Wyświetl plik

@@ -34,6 +34,15 @@ abstract class LuBusiness {
34 34
         throw new LuBusinessException($reason, 400);
35 35
     }
36 36
 
37
+    /**
38
+     * @param \Closure $function
39
+     * @return mixed
40
+     */
41
+    public static function transact(\Closure $function)
42
+    {
43
+        return static::getDataAccess()->transact($function);
44
+    }
45
+
37 46
     /**
38 47
      * @param $id int
39 48
      * @return LuDbo

Ładowanie…
Anuluj
Zapisz