diff --git a/core/Abstracts/TraitApplication.php b/core/Abstracts/TraitApplication.php index 27788313..fcf6caf8 100644 --- a/core/Abstracts/TraitApplication.php +++ b/core/Abstracts/TraitApplication.php @@ -9,7 +9,6 @@ use Database\Connection; use Database\DatabasesProviders; use Http\Client\Client; use Http\Client\Curl; -use Http\HttpFilter; use Http\Route\Router; use Server\Server; use Kiri\Crontab\Producer; @@ -32,7 +31,6 @@ use Kiri\Jwt\Jwt; * @property Connection $databases * @property Curl $curl * @property Producer $crontab - * @property HttpFilter $filter */ trait TraitApplication { diff --git a/http-helper/HttpFilter.php b/http-helper/HttpFilter.php deleted file mode 100644 index b67c0cf4..00000000 --- a/http-helper/HttpFilter.php +++ /dev/null @@ -1,68 +0,0 @@ -hash[$className . '::' . $method] = $rules; - return $this; - } - - - /** - * @param string $className - * @param string $method - * @return array - */ - public function getRules(string $className, string $method): array - { - return $this->hash[$className . '::' . $method] ?? []; - } - - - /** - * @param array $rules - * @return bool|Validator - * @throws Exception - */ - public function check(array $rules): bool|Validator - { - if (empty($rules)) { - return true; - } - $validator = Validator::getInstance(); - $validator->setParams(Input()->load()); - foreach ($rules as $val) { - $field = array_shift($val); - if (empty($val)) { - continue; - } - $validator->make($field, $val); - } - return $validator; - } - -} diff --git a/note/Route/Filter.php b/note/Route/Filter.php deleted file mode 100644 index f2aee9fb..00000000 --- a/note/Route/Filter.php +++ /dev/null @@ -1,32 +0,0 @@ -