Selaa lähdekoodia

fixed resource name

tags/0.1.0
Robin Thoni 8 vuotta sitten
vanhempi
commit
95c433ec6b
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3
    2
      src/Utils/LuBusiness.php

+ 3
- 2
src/Utils/LuBusiness.php Näytä tiedosto

@@ -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…
Peruuta
Tallenna