1616use ReflectionException ;
1717use ReflectionFunction ;
1818
19- class Action
19+ class Compass
2020{
2121 private const INJECTION_EXCEPTION_TYPE = [
2222 'string ' , 'array ' , 'bool ' , 'int ' ,
2323 'integer ' , 'double ' , 'float ' , 'callable ' ,
2424 'object ' , 'stdclass ' , '\closure ' , 'closure '
2525 ];
2626 /**
27- * The Action instance
27+ * The Compass instance
2828 *
29- * @var ?Action
29+ * @var ?Compass
3030 */
31- private static ?Action $ instance = null ;
31+ private static ?Compass $ instance = null ;
3232 /**
3333 * The list of namespaces defined in the application
3434 *
@@ -49,7 +49,7 @@ class Action
4949 private MiddlewareDispatcher $ dispatcher ;
5050
5151 /**
52- * Action constructor
52+ * Compass constructor
5353 *
5454 * @param array $namespaces
5555 * @param array $middlewares
@@ -64,17 +64,17 @@ public function __construct(array $namespaces, array $middlewares)
6464 }
6565
6666 /**
67- * Action configuration
67+ * Compass configuration
6868 *
6969 * @param array $namespaces
7070 * @param array $middlewares
7171 *
7272 * @return static
7373 */
74- public static function configure (array $ namespaces , array $ middlewares ): Action
74+ public static function configure (array $ namespaces , array $ middlewares ): Compass
7575 {
7676 if (is_null (static ::$ instance )) {
77- static ::$ instance = new Action ($ namespaces , $ middlewares );
77+ static ::$ instance = new Compass ($ namespaces , $ middlewares );
7878 }
7979
8080 return static ::$ instance ;
@@ -263,11 +263,11 @@ public function call(callable|string|array $actions, ?array $param = null): mixe
263263 }
264264
265265 /**
266- * Retrieves Action instance
266+ * Retrieves Compass instance
267267 *
268- * @return Action
268+ * @return Compass
269269 */
270- public static function getInstance (): Action
270+ public static function getInstance (): Compass
271271 {
272272 return static ::$ instance ;
273273 }
@@ -372,7 +372,7 @@ private function getInjectParameter(mixed $class): ?object
372372 {
373373 $ class_name = $ class ->getName ();
374374
375- if (in_array (strtolower ($ class_name ), Action ::INJECTION_EXCEPTION_TYPE )) {
375+ if (in_array (strtolower ($ class_name ), Compass ::INJECTION_EXCEPTION_TYPE )) {
376376 return null ;
377377 }
378378
0 commit comments