diff --git a/composer.json b/composer.json index 46f7b80..8018557 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "modulusphp/utility", "description": "Utility component for Modulus", - "version": "1.9.4.4", + "version": "1.9.4.5", "license": "MIT", "type": "package", "authors": [{ @@ -23,7 +23,7 @@ }, "autoload": { "psr-4": { - "Modulus\\Utility\\": "" + "Modulus\\Utility\\": "src/" } }, "minimum-stability": "stable" diff --git a/Accessor.php b/src/Accessor.php similarity index 100% rename from Accessor.php rename to src/Accessor.php diff --git a/Command.php b/src/Command.php similarity index 100% rename from Command.php rename to src/Command.php diff --git a/Event.php b/src/Event.php similarity index 100% rename from Event.php rename to src/Event.php diff --git a/Events.php b/src/Events.php similarity index 100% rename from Events.php rename to src/Events.php diff --git a/GlobalVariables.php b/src/GlobalVariables.php similarity index 100% rename from GlobalVariables.php rename to src/GlobalVariables.php diff --git a/Groupable.php b/src/Groupable.php similarity index 100% rename from Groupable.php rename to src/Groupable.php diff --git a/Mail.php b/src/Mail.php similarity index 100% rename from Mail.php rename to src/Mail.php diff --git a/Middleware.php b/src/Middleware.php similarity index 100% rename from Middleware.php rename to src/Middleware.php diff --git a/Notification.php b/src/Notification.php similarity index 100% rename from Notification.php rename to src/Notification.php diff --git a/Plugin.php b/src/Plugin.php similarity index 100% rename from Plugin.php rename to src/Plugin.php diff --git a/Process.php b/src/Process.php similarity index 100% rename from Process.php rename to src/Process.php diff --git a/Reflect.php b/src/Reflect.php similarity index 94% rename from Reflect.php rename to src/Reflect.php index 12bd3d0..bc8daa7 100644 --- a/Reflect.php +++ b/src/Reflect.php @@ -5,10 +5,10 @@ use ReflectionMethod; use ReflectionFunction; -use Modulus\Http\Request; +use Modulus\Http\Request\Base; use Modulus\Utility\Groupable; -use Modulus\Framework\Mocks\RouteBinding; +use Modulus\Framework\Mocks\RouteBinding; use Illuminate\Database\Eloquent\Model as EloquentModel; use Illuminate\Database\Eloquent\Collection as EloquentCollection; @@ -20,7 +20,7 @@ class Reflect /** * $request * - * @var \Request + * @var \Modulus\Http\Request\Base */ public static $request; @@ -62,9 +62,8 @@ private function celebrate($params, $variables, $route, $i = 0, $args = []) : ar if (class_exists($class)) { $instance = new $class(); - if ($instance instanceof Request) { - $data = array_merge($_POST, $_FILES); - $request = new $class($data); + if ($instance instanceof Base) { + $request = new $class(); $args[$where] = $request; @@ -129,7 +128,7 @@ private function hasRequest($params, $variables, $i = null) : array { foreach($params as $key => $param) { $class = '\\' . $param->getType(); - if (class_exists($class) && new $class() instanceof Request) { + if (class_exists($class) && new $class() instanceof Base) { $i = $key; } } diff --git a/RouteQuery.php b/src/RouteQuery.php similarity index 100% rename from RouteQuery.php rename to src/RouteQuery.php diff --git a/Scheduler.php b/src/Scheduler.php similarity index 100% rename from Scheduler.php rename to src/Scheduler.php diff --git a/Seeder.php b/src/Seeder.php similarity index 100% rename from Seeder.php rename to src/Seeder.php diff --git a/Validate.php b/src/Validate.php similarity index 100% rename from Validate.php rename to src/Validate.php diff --git a/Variable.php b/src/Variable.php similarity index 100% rename from Variable.php rename to src/Variable.php diff --git a/View.php b/src/View.php similarity index 100% rename from View.php rename to src/View.php