Browse Source

added business transact method

develop
Robin Thoni 8 years ago
parent
commit
fe848d4e56
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/Utils/Business/LuBusiness.php

+ 9
- 0
src/Utils/Business/LuBusiness.php View File

@@ -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

Loading…
Cancel
Save