Parcourir la source

fixed resource name

tags/0.1.0
Robin Thoni il y a 8 ans
Parent
révision
95c433ec6b
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3
    2
      src/Utils/LuBusiness.php

+ 3
- 2
src/Utils/LuBusiness.php Voir le fichier

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

Chargement…
Annuler
Enregistrer