Explorar el Código

fixed resource name

tags/0.1.0
Robin Thoni hace 8 años
padre
commit
95c433ec6b
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3
    2
      src/Utils/LuBusiness.php

+ 3
- 2
src/Utils/LuBusiness.php Ver fichero

@@ -137,7 +137,8 @@ abstract class LuBusiness {
137 137
 
138 138
     public static function getResourceName()
139 139
     {
140
-        $class = preg_replace('/([^\\\\]*)Business$/', '${1}', get_called_class());
141
-        return $class;
140
+        $match = [];
141
+        preg_match('/([^\\\\]*)Business$/', get_called_class(), $match);
142
+        return $match[1];
142 143
     }
143 144
 }

Loading…
Cancelar
Guardar