Sfoglia il codice sorgente

fixed resource name

tags/0.1.0
Robin Thoni 9 anni fa
parent
commit
95c433ec6b
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3
    2
      src/Utils/LuBusiness.php

+ 3
- 2
src/Utils/LuBusiness.php Vedi File

@@ -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…
Annulla
Salva