Quellcode durchsuchen

dev分支忽略文件

the_bug vor 5 Monaten
Ursprung
Commit
5ef877495d

+ 0 - 22
.env

@@ -1,22 +0,0 @@
-APP_NAME=user_producer
-APP_ENV=dev
-HOST = http://101.254.114.211:13306/
-DB_DRIVER=mysql
-DB_HOST=101.254.114.211
-DB_PORT=13306
-DB_DATABASE=hyperf
-DB_USERNAME=root
-DB_PASSWORD=xKmapDpKCxMMSkbe
-DB_CHARSET=utf8mb4
-DB_COLLATION=utf8mb4_unicode_ci
-DB_PREFIX=
-
-REDIS_HOST=101.254.114.211
-REDIS_AUTH=YPWWnFnNebc7427B
-REDIS_PORT=26739
-REDIS_DB=0
-
-AMQP_HOST=103.105.201.2
-AMQP_PORT=5673
-AMQP_USER=rabbitmq
-AMQP_PASSWORD=H8eDTAk6LY7EjJ8y

+ 2 - 0
.gitignore

@@ -25,3 +25,5 @@ runtime/hyperf.pid
 runtime/hyperf.pid
 runtime/container/classes.cache
 runtime/container/scan.cache
+runtime
+/.env

+ 31 - 0
bin/hyperf.php

@@ -0,0 +1,31 @@
+#!/usr/bin/env php
+<?php
+/**
+ * This file is part of Hyperf.
+ *
+ * @link     https://www.hyperf.io
+ * @document https://hyperf.wiki
+ * @contact  group@hyperf.io
+ * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
+ */
+ini_set('display_errors', 'on');
+ini_set('display_startup_errors', 'on');
+ini_set('memory_limit', '1G');
+
+error_reporting(E_ALL);
+
+! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
+
+require BASE_PATH . '/vendor/autoload.php';
+
+! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());
+
+// Self-called anonymous function that creates its own scope and keep the global namespace clean.
+(function () {
+    Hyperf\Di\ClassLoader::init();
+    /** @var Psr\Container\ContainerInterface $container */
+    $container = require BASE_PATH . '/config/container.php';
+
+    $application = $container->get(Hyperf\Contract\ApplicationInterface::class);
+    $application->run();
+})();

+ 0 - 32
runtime/container/proxy/App_Controller_AbstractController.proxy.php

@@ -1,32 +0,0 @@
-<?php
-
-declare (strict_types=1);
-/**
- * This file is part of Hyperf.
- *
- * @link     https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact  group@hyperf.io
- * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
-namespace App\Controller;
-
-use Hyperf\Di\Annotation\Inject;
-use Hyperf\HttpServer\Contract\RequestInterface;
-use Hyperf\HttpServer\Contract\ResponseInterface;
-use Psr\Container\ContainerInterface;
-abstract class AbstractController
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    #[Inject]
-    protected ContainerInterface $container;
-    #[Inject]
-    protected RequestInterface $request;
-    #[Inject]
-    protected ResponseInterface $response;
-}

+ 0 - 34
runtime/container/proxy/App_Controller_IndexController.proxy.php

@@ -1,34 +0,0 @@
-<?php
-
-declare (strict_types=1);
-/**
- * This file is part of Hyperf.
- *
- * @link     https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact  group@hyperf.io
- * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
-namespace App\Controller;
-
-class IndexController extends AbstractController
-{
-    use \Hyperf\Di\Aop\ProxyTrait;
-    use \Hyperf\Di\Aop\PropertyHandlerTrait;
-    function __construct()
-    {
-        if (method_exists(parent::class, '__construct')) {
-            parent::__construct(...func_get_args());
-        }
-        $this->__handlePropertyHandler(__CLASS__);
-    }
-    public function index()
-    {
-        $user = $this->request->input('user', 'Hyperf');
-        $method = $this->request->getMethod();
-        return ['method' => $method, 'message' => "Hello {$user}."];
-    }
-    public function category()
-    {
-    }
-}