├── src ├── Tool │ ├── README.md │ ├── Parser │ │ └── ToolParser.php │ ├── ArgType.php │ └── Annotation │ │ ├── Arg.php │ │ ├── Tool.php │ │ └── Operation.php ├── Controller │ ├── README.md │ ├── HttpController.php │ ├── TcpController.php │ ├── UdpController.php │ └── WebSocketController.php ├── Cli │ ├── bin │ │ └── imi-cli │ ├── ImiConsoleOutput.php │ ├── CliAppContexts.php │ ├── Annotation │ │ ├── Arg.php │ │ ├── Tool.php │ │ ├── Operation.php │ │ ├── Command.php │ │ └── CommandAction.php │ ├── Contract │ │ └── BaseCommand.php │ ├── Listener │ │ ├── LoadRuntimeListener.php │ │ └── BuildRuntimeListener.php │ └── ArgType.php ├── Bean │ ├── IBean.php │ ├── Exception │ │ ├── NotFoundException.php │ │ └── ContainerException.php │ ├── Parser │ │ ├── NullParser.php │ │ ├── IParser.php │ │ ├── ClassEventParser.php │ │ ├── PartialParser.php │ │ └── BaseParser.php │ ├── Annotation │ │ ├── Model │ │ │ ├── IAnnotationRelation.php │ │ │ └── ClassAnnotationRelation.php │ │ ├── Parser.php │ │ ├── Partial.php │ │ ├── ClassEventListener.php │ │ ├── Listener.php │ │ ├── Inherit.php │ │ └── Callback.php │ └── Traits │ │ └── TAutoInject.php ├── Cron │ ├── Message │ │ ├── IMessage.php │ │ ├── Clear.php │ │ ├── GetRealTasks.php │ │ ├── GetTask.php │ │ ├── HasTask.php │ │ ├── RemoveCron.php │ │ └── AddCron.php │ ├── Contract │ │ ├── ICronTask.php │ │ └── IScheduler.php │ ├── Consts │ │ ├── CronTaskType.php │ │ └── UniqueLevel.php │ └── Traits │ │ └── TWorkerReport.php ├── Db │ ├── Exception │ │ └── DbException.php │ ├── Query │ │ ├── Interfaces │ │ │ ├── IGroup.php │ │ │ ├── IHaving.php │ │ │ ├── IHavingBrackets.php │ │ │ ├── IWhereFullText.php │ │ │ ├── IPartition.php │ │ │ ├── IWhereCollector.php │ │ │ ├── IWhereBrackets.php │ │ │ ├── IBaseWhere.php │ │ │ ├── IWrapField.php │ │ │ ├── IOrder.php │ │ │ ├── IBase.php │ │ │ ├── IPaginateResult.php │ │ │ ├── IField.php │ │ │ ├── IDatabase.php │ │ │ ├── IWhere.php │ │ │ └── ITable.php │ │ ├── Group.php │ │ ├── Having │ │ │ ├── Having.php │ │ │ └── HavingBrackets.php │ │ ├── Builder │ │ │ └── IBuilder.php │ │ ├── QueryType.php │ │ ├── Result │ │ │ └── BaseChunkResult.php │ │ ├── Raw.php │ │ └── Where │ │ │ └── BaseWhere.php │ ├── Mysql │ │ ├── Contract │ │ │ ├── IMysqlStatement.php │ │ │ └── IMysqlDb.php │ │ ├── Drivers │ │ │ ├── MysqlBaseStatement.php │ │ │ └── PdoMysql │ │ │ │ └── Statement.php │ │ ├── Query │ │ │ ├── Lock │ │ │ │ └── MysqlLock.php │ │ │ └── FullText │ │ │ │ └── SearchModifier.php │ │ └── Consts │ │ │ └── LogicalOperator.php │ ├── Annotation │ │ ├── RollbackType.php │ │ ├── TransactionType.php │ │ └── DbInject.php │ ├── Drivers │ │ ├── BaseStatement.php │ │ └── Base.php │ ├── Event │ │ └── Param │ │ │ └── DbPrepareEventParam.php │ ├── Listener │ │ ├── WorkerStart.php │ │ └── RequestContextDestroy.php │ └── SqlState.php ├── Lock │ ├── Exception │ │ └── LockFailException.php │ └── LockConfigOption.php ├── Main │ ├── IMain.php │ └── AppBaseMain.php ├── Util │ ├── Interfaces │ │ ├── IHashCode.php │ │ └── IArrayable.php │ ├── StaticValueStorage.php │ ├── Traits │ │ ├── TStaticClass.php │ │ ├── TBeanRealClass.php │ │ ├── TAnonymous.php │ │ ├── TNotRequiredDataToProperty.php │ │ ├── THashCode.php │ │ └── TDataToProperty.php │ ├── MemoryTable │ │ └── IMemoryTableOption.php │ ├── Process.php │ ├── Bit.php │ ├── Format │ │ ├── IFormat.php │ │ ├── PhpSerialize.php │ │ └── Json.php │ ├── Http │ │ ├── MessageUtil.php │ │ └── Consts │ │ │ └── RequestMethod.php │ ├── Process │ │ ├── ProcessAppContexts.php │ │ └── ProcessType.php │ ├── ImiPriority.php │ ├── Digital.php │ ├── LazyArrayObject.php │ └── Socket │ │ └── IPEndPoint.php ├── Cache │ ├── CacheException.php │ └── InvalidArgumentException.php ├── Server │ ├── DataParser │ │ └── IParser.php │ ├── Group │ │ └── Exception │ │ │ └── MethodNotFoundException.php │ ├── Http │ │ ├── Message │ │ │ ├── Emitter │ │ │ │ ├── Contract │ │ │ │ │ ├── BaseEmitter.php │ │ │ │ │ └── IResponseBodyEmitter.php │ │ │ │ └── Handler │ │ │ │ │ └── IEmitHandler.php │ │ │ ├── Request.php │ │ │ └── Contract │ │ │ │ └── IHttpRequest.php │ │ ├── Error │ │ │ ├── IErrorHandler.php │ │ │ ├── IExecuteTimeoutHandler.php │ │ │ ├── IHttpNotFoundHandler.php │ │ │ ├── ErrorHandler.php │ │ │ └── ExecuteTimeoutHandler.php │ │ ├── Route │ │ │ ├── Annotation │ │ │ │ ├── Action.php │ │ │ │ └── Middleware.php │ │ │ └── RouteResult.php │ │ ├── Cli │ │ │ └── template.tpl │ │ ├── Parser │ │ │ └── ControllerParser.php │ │ └── Annotation │ │ │ ├── ExtractData.php │ │ │ └── RequestParam.php │ ├── View │ │ ├── Annotation │ │ │ ├── BaseViewOption.php │ │ │ ├── XmlView.php │ │ │ └── HtmlView.php │ │ ├── Engine │ │ │ └── IEngine.php │ │ └── Handler │ │ │ └── IHandler.php │ ├── TcpServer │ │ ├── Route │ │ │ ├── IRoute.php │ │ │ ├── Annotation │ │ │ │ ├── TcpAction.php │ │ │ │ └── TcpController.php │ │ │ ├── RouteResult.php │ │ │ └── RouteItem.php │ │ ├── Error │ │ │ ├── IErrorHandler.php │ │ │ ├── ITcpRouteNotFoundHandler.php │ │ │ ├── ErrorHandler.php │ │ │ └── TcpRouteNotFoundHandler.php │ │ ├── IReceiveHandler.php │ │ ├── Middleware │ │ │ └── IMiddleware.php │ │ ├── Contract │ │ │ └── ITcpServer.php │ │ ├── Message │ │ │ └── IReceiveData.php │ │ └── Parser │ │ │ └── TcpControllerParser.php │ ├── UdpServer │ │ ├── Route │ │ │ ├── IRoute.php │ │ │ ├── Annotation │ │ │ │ ├── UdpAction.php │ │ │ │ └── UdpController.php │ │ │ ├── RouteResult.php │ │ │ └── RouteItem.php │ │ ├── Error │ │ │ ├── IErrorHandler.php │ │ │ ├── IUdpRouteNotFoundHandler.php │ │ │ ├── ErrorHandler.php │ │ │ └── UdpRouteNotFoundHandler.php │ │ ├── IPacketHandler.php │ │ ├── Middleware │ │ │ └── IMiddleware.php │ │ ├── Contract │ │ │ └── IUdpServer.php │ │ ├── Message │ │ │ └── IPacketData.php │ │ ├── Parser │ │ │ └── UdpControllerParser.php │ │ └── Controller │ │ │ └── UdpController.php │ ├── WebSocket │ │ ├── Route │ │ │ ├── IRoute.php │ │ │ ├── Annotation │ │ │ │ ├── WSAction.php │ │ │ │ ├── WSConfig.php │ │ │ │ ├── WSController.php │ │ │ │ └── WSMiddleware.php │ │ │ ├── RouteResult.php │ │ │ └── RouteItem.php │ │ ├── Error │ │ │ ├── IErrorHandler.php │ │ │ ├── IWSRouteNotFoundHandler.php │ │ │ ├── ErrorHandler.php │ │ │ └── WSRouteNotFoundHandler.php │ │ ├── IMessageHandler.php │ │ ├── Middleware │ │ │ └── IMiddleware.php │ │ ├── Enum │ │ │ └── NonControlFrameType.php │ │ ├── Contract │ │ │ └── IWebSocketServer.php │ │ ├── Parser │ │ │ └── WSControllerParser.php │ │ └── Controller │ │ │ └── WebSocketController.php │ ├── ConnectionContext │ │ └── Event │ │ │ ├── Listener │ │ │ └── IConnectionContextRestoreListener.php │ │ │ └── Param │ │ │ └── ConnectionContextRestoreParam.php │ ├── Protocol.php │ └── Route │ │ └── TMiddleware.php ├── Core │ ├── Context │ │ ├── Exception │ │ │ ├── ContextExistsException.php │ │ │ └── ContextNotFoundException.php │ │ └── Contract │ │ │ └── IContextManager.php │ ├── Runtime │ │ ├── Contract │ │ │ └── IRuntimeModeHandler.php │ │ ├── Runtime.php │ │ └── Handler │ │ │ └── DefaultRuntimeModeHandler.php │ ├── App │ │ ├── Enum │ │ │ └── LoadRuntimeResult.php │ │ └── Contract │ │ │ └── IApp.php │ └── Component │ │ └── Listener │ │ ├── LoadRuntimeListener.php │ │ └── BuildRuntimeListener.php ├── Model │ ├── Cli │ │ └── Model │ │ │ ├── Event │ │ │ └── Param │ │ │ │ ├── AfterGenerateModels.php │ │ │ │ ├── BeforeGenerateModels.php │ │ │ │ ├── AfterGenerateModel.php │ │ │ │ └── BeforeGenerateModel.php │ │ │ └── template.tpl │ ├── Event │ │ ├── Listener │ │ │ ├── IInitEventListener.php │ │ │ ├── IAfterFindEventListener.php │ │ │ ├── IAfterSaveEventListener.php │ │ │ ├── IBeforeFindEventListener.php │ │ │ ├── IBeforeSaveEventListener.php │ │ │ ├── IAfterDeleteEventListener.php │ │ │ ├── IAfterInsertEventListener.php │ │ │ ├── IAfterSelectEventListener.php │ │ │ ├── IAfterUpdateEventListener.php │ │ │ ├── IBeforeDeleteEventListener.php │ │ │ ├── IBeforeInsertEventListener.php │ │ │ ├── IBeforeSelectEventListener.php │ │ │ ├── IBeforeUpdateEventListener.php │ │ │ ├── IAfterBatchDeleteEventListener.php │ │ │ ├── IAfterBatchUpdateEventListener.php │ │ │ ├── IBeforeBatchDeleteEventListener.php │ │ │ ├── IBeforeBatchUpdateEventListener.php │ │ │ ├── IAfterParseDataEventListener.php │ │ │ ├── IBeforeParseDataEventListener.php │ │ │ └── IAfterQueryEventListener.php │ │ └── Param │ │ │ ├── AfterQueryEventParam.php │ │ │ ├── AfterSelectEventParam.php │ │ │ ├── BeforeSelectEventParam.php │ │ │ ├── BeforeBatchDeleteEventParam.php │ │ │ ├── AfterBatchDeleteEventParam.php │ │ │ ├── InitEventParam.php │ │ │ ├── AfterFindEventParam.php │ │ │ ├── BeforeFindEventParam.php │ │ │ ├── BeforeParseDataEventParam.php │ │ │ ├── AfterDeleteEventParam.php │ │ │ ├── BeforeDeleteEventParam.php │ │ │ ├── AfterBatchUpdateEventParam.php │ │ │ ├── BeforeBatchUpdateEventParam.php │ │ │ ├── AfterParseDataEventParam.php │ │ │ ├── AfterSaveEventParam.php │ │ │ ├── BeforeSaveEventParam.php │ │ │ ├── AfterInsertEventParam.php │ │ │ ├── AfterUpdateEventParam.php │ │ │ ├── BeforeInsertEventParam.php │ │ │ └── BeforeUpdateEventParam.php │ ├── ModelQuery.php │ ├── Annotation │ │ ├── JsonNotNull.php │ │ ├── Relation │ │ │ ├── RelationBase.php │ │ │ ├── JoinToMiddle.php │ │ │ ├── JoinFromMiddle.php │ │ │ ├── AutoDelete.php │ │ │ ├── AutoInsert.php │ │ │ ├── JoinTo.php │ │ │ ├── JoinFrom.php │ │ │ ├── AutoSave.php │ │ │ ├── AutoUpdate.php │ │ │ └── AutoSelect.php │ │ ├── Sql.php │ │ ├── Serializables.php │ │ ├── Serializable.php │ │ ├── Entity.php │ │ ├── ExtractProperty.php │ │ ├── JsonEncode.php │ │ ├── Id.php │ │ └── Table.php │ ├── IdGenerator │ │ ├── Contract │ │ │ └── IIdGenerator.php │ │ └── UUIDGeneratorType.php │ ├── Enum │ │ ├── RelationPoolName.php │ │ └── RedisStorageMode.php │ ├── Relation │ │ ├── Struct │ │ │ ├── OneToMany.php │ │ │ ├── OneToOne.php │ │ │ ├── PolymorphicOneToOne.php │ │ │ └── PolymorphicOneToMany.php │ │ └── TRelation.php │ ├── Key │ │ └── KeyRule.php │ ├── Contract │ │ └── IModelQuery.php │ ├── Tree │ │ └── Annotation │ │ │ └── TreeModel.php │ └── Traits │ │ └── TSetValue.php ├── Event │ ├── IEventListener.php │ ├── EventItem.php │ └── Listener │ │ ├── LoadRuntimeListener.php │ │ └── BuildRuntimeListener.php ├── Aop │ ├── Annotation │ │ ├── After.php │ │ ├── Around.php │ │ ├── Before.php │ │ ├── AfterReturning.php │ │ ├── BaseInjectValue.php │ │ ├── Aspect.php │ │ ├── AfterThrowing.php │ │ ├── FilterArg.php │ │ ├── InjectArg.php │ │ ├── PointCut.php │ │ └── CallableValue.php │ ├── PointCutType.php │ ├── AfterReturningJoinPoint.php │ └── Listener │ │ └── BuildRuntimeListener.php ├── Async │ ├── Annotation │ │ ├── Async.php │ │ ├── Defer.php │ │ └── DeferAsync.php │ ├── Contract │ │ ├── IAsyncResult.php │ │ └── IAsyncHandler.php │ └── Exception │ │ └── AsyncTimeoutException.php ├── AppContexts.php ├── HttpValidate │ └── Annotation │ │ ├── HttpValidation.php │ │ └── ExtractData.php ├── Log │ ├── LogLevel.php │ └── MonoLogger.php ├── Facade │ ├── Cli │ │ └── template.tpl │ └── Annotation │ │ └── Facade.php ├── Redis │ ├── Enum │ │ └── RedisMode.php │ ├── Annotation │ │ └── RedisInject.php │ └── SyncRedisPool.php ├── Pool │ ├── Listener │ │ ├── RequestContextDestroy.php │ │ ├── ClearListener.php │ │ └── WorkerStart.php │ ├── ResourceConfigMode.php │ ├── Annotation │ │ ├── PoolClean.php │ │ └── PoolResource.php │ ├── BasePoolResource.php │ ├── TUriResourceConfig.php │ └── Interfaces │ │ └── IPoolResource.php ├── Validate │ └── Annotation │ │ ├── AutoValidation.php │ │ ├── Scene.php │ │ ├── ValidateValue.php │ │ └── Required.php ├── Timer │ └── Contract │ │ └── ITimer.php ├── HotUpdate │ └── Monitor │ │ ├── IMonitor.php │ │ └── BaseMonitor.php ├── Contract │ └── IWorker.php ├── Enum │ ├── Annotation │ │ ├── Parser │ │ │ └── EnumParser.php │ │ └── EnumItem.php │ └── Listener │ │ ├── LoadRuntimeListener.php │ │ └── BuildRuntimeListener.php └── RequestContextProxy │ ├── Cli │ └── template.tpl │ └── Annotation │ └── RequestContextProxy.php └── config └── config.php /src/Tool/README.md: -------------------------------------------------------------------------------- 1 | 本目录仅兼容 imi v1 2 | -------------------------------------------------------------------------------- /src/Controller/README.md: -------------------------------------------------------------------------------- 1 | 本目录仅兼容 imi v1 2 | -------------------------------------------------------------------------------- /src/Cli/bin/imi-cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | [ 7 | 'Imi\Components\*', 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /src/Cron/Message/Clear.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | declare(strict_types=1); 4 | 5 | namespace = $namespace; ?>; 6 | 7 | use Imi\Facade\BaseFacade; 8 | use Imi\Facade\Annotation\Facade; 9 | 10 | /** 11 | * =$facadeAnnotation; ?> 12 | 13 | 14 | * =$item; ?> 15 | 16 | 17 | */ 18 | class = $shortClassName; ?> extends BaseFacade 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/Server/UdpServer/Contract/IUdpServer.php: -------------------------------------------------------------------------------- 1 | initLeftAndRight($className, $propertyName, $annotation); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Model/Relation/Struct/OneToOne.php: -------------------------------------------------------------------------------- 1 | initLeftAndRight($className, $propertyName, $annotation); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Cron/Consts/CronTaskType.php: -------------------------------------------------------------------------------- 1 | initLeftAndRight($className, $propertyName, $annotation); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Model/Cli/Model/template.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | declare(strict_types=1); 6 | 7 | namespace ; 8 | 9 | use Imi\Bean\Annotation\Inherit; 10 | use \Base\Base; 11 | 12 | /** 13 | * . 14 | * 15 | * @Inherit 16 | */ 17 | class extends Base 18 | { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/Model/Relation/Struct/PolymorphicOneToMany.php: -------------------------------------------------------------------------------- 1 | initLeftAndRight($className, $propertyName, $annotation); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Server/TcpServer/Contract/ITcpServer.php: -------------------------------------------------------------------------------- 1 | getArray(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Model/IdGenerator/UUIDGeneratorType.php: -------------------------------------------------------------------------------- 1 | config) 20 | { 21 | return $this->config = Config::get('@app'); 22 | } 23 | 24 | return $this->config; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Model/Event/Param/AfterBatchUpdateEventParam.php: -------------------------------------------------------------------------------- 1 | $v) 17 | { 18 | $this->{$k} = $v; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Server/TcpServer/Error/ITcpRouteNotFoundHandler.php: -------------------------------------------------------------------------------- 1 | __hashCode; 17 | if (null === $hashCode) 18 | { 19 | $hashCode = spl_object_hash($this); 20 | } 21 | 22 | return $hashCode; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Cli/Annotation/Tool.php: -------------------------------------------------------------------------------- 1 | rule = $rule; 24 | $this->paramNames = $paramNames; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Pool/ResourceConfigMode.php: -------------------------------------------------------------------------------- 1 | $v) 20 | { 21 | $this->{$k} = $v; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Cron/Consts/UniqueLevel.php: -------------------------------------------------------------------------------- 1 | $values) 17 | { 18 | $result[$name] = implode(', ', $values); 19 | } 20 | 21 | return $result; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Async/Contract/IAsyncHandler.php: -------------------------------------------------------------------------------- 1 | __autoInject(); 18 | } 19 | 20 | /** 21 | * 自动注入属性. 22 | */ 23 | protected function __autoInject(): void 24 | { 25 | BeanProxy::injectProps($this, BeanFactory::getObjectClass($this)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Server/WebSocket/Enum/NonControlFrameType.php: -------------------------------------------------------------------------------- 1 | setRawSQL($raw, $binds); 18 | } 19 | 20 | /** 21 | * {@inheritDoc} 22 | */ 23 | public function toString(IQuery $query): string 24 | { 25 | return $this->rawSQL; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Server/Http/Error/ErrorHandler.php: -------------------------------------------------------------------------------- 1 | handler)->handle($throwable); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Server/WebSocket/Contract/IWebSocketServer.php: -------------------------------------------------------------------------------- 1 | className, $annotation->eventName, $className, $annotation->priority); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Cron/Contract/IScheduler.php: -------------------------------------------------------------------------------- 1 | toArray()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Server/Http/Cli/template.tpl: -------------------------------------------------------------------------------- 1 | =' 2 | 3 | declare(strict_types=1); 4 | 5 | namespace = $namespace; ?>; 6 | 7 | use Imi\Controller\HttpController; 8 | use Imi\Server\View\Annotation\View; 9 | use Imi\Server\Http\Route\Annotation\Action; 10 | use Imi\Server\Http\Route\Annotation\Controller; 11 | 12 | /** 13 | * @Controller("= $prefix; ?>") 14 | * @View(renderType="= $render; ?>") 15 | */ 16 | class = $name; ?> extends HttpController 17 | { 18 | /** 19 | * index 20 | * 21 | * @Action 22 | * @return void 23 | */ 24 | public function index() 25 | { 26 | return ['success'=>true]; 27 | } 28 | } -------------------------------------------------------------------------------- /src/Validate/Annotation/Scene.php: -------------------------------------------------------------------------------- 1 | class); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Cli/Contract/BaseCommand.php: -------------------------------------------------------------------------------- 1 | command = $command; 22 | $this->input = $input; 23 | $this->output = $output; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Model/Annotation/Relation/JoinFrom.php: -------------------------------------------------------------------------------- 1 | routeItem = $routeItem; 29 | $this->params = $params; 30 | $this->callable = $routeItem->callable; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Bean/Annotation/Partial.php: -------------------------------------------------------------------------------- 1 | getData()['data']['cli'] ?? []; 25 | CliManager::setMap($data['cli'] ?? []); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Pool/Annotation/PoolResource.php: -------------------------------------------------------------------------------- 1 | name); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Aop/AfterReturningJoinPoint.php: -------------------------------------------------------------------------------- 1 | returnValue = $value; 26 | } 27 | 28 | /** 29 | * 获取返回值 30 | * 31 | * @return mixed 32 | */ 33 | public function getReturnValue() 34 | { 35 | return $this->returnValue; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Enum/Listener/LoadRuntimeListener.php: -------------------------------------------------------------------------------- 1 | getData()['data']['enum'] ?? []; 25 | EnumManager::setMap($data['enum'] ?? []); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Pool/Listener/WorkerStart.php: -------------------------------------------------------------------------------- 1 | getData(); 24 | $data = []; 25 | $data['cli'] = CliManager::getMap(); 26 | $eventData['data']['cli'] = $data; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Redis/Annotation/RedisInject.php: -------------------------------------------------------------------------------- 1 | name); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Validate/Annotation/ValidateValue.php: -------------------------------------------------------------------------------- 1 | getData(); 24 | $data = []; 25 | $data['enum'] = EnumManager::getMap(); 26 | $eventData['data']['enum'] = $data; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aop/Annotation/PointCut.php: -------------------------------------------------------------------------------- 1 | handler) 23 | { 24 | return RequestContext::getServerBean($this->handler)->handle($throwable); 25 | } 26 | else 27 | { 28 | return false; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Server/UdpServer/Error/ErrorHandler.php: -------------------------------------------------------------------------------- 1 | handler) 23 | { 24 | return RequestContext::getServerBean($this->handler)->handle($throwable); 25 | } 26 | else 27 | { 28 | return false; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Server/TcpServer/Message/IReceiveData.php: -------------------------------------------------------------------------------- 1 | handler) 23 | { 24 | return RequestContext::getServerBean($this->handler)->handle($throwable); 25 | } 26 | else 27 | { 28 | return false; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Bean/Annotation/ClassEventListener.php: -------------------------------------------------------------------------------- 1 | getData()['data']['component']['components'] ?? []); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Db/Query/Interfaces/IField.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | namespace ; 4 | 5 | use Imi\Bean\Annotation\Bean; 6 | use Imi\RequestContextProxy\BaseRequestContextProxy; 7 | use Imi\RequestContextProxy\Annotation\RequestContextProxy; 8 | 9 | /** 10 | 11 | * 12 | 13 | 14 | * 15 | 16 | * 17 | 18 | * 19 | 20 | 21 | */ 22 | class extends BaseRequestContextProxy implements \ 23 | 24 | { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Redis/SyncRedisPool.php: -------------------------------------------------------------------------------- 1 | initUriResourceConfig(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Server/Http/Parser/ControllerParser.php: -------------------------------------------------------------------------------- 1 | controllerAnnotationClass = Controller::class; 21 | } 22 | 23 | /** 24 | * {@inheritDoc} 25 | */ 26 | public function parse(\Imi\Bean\Annotation\Base $annotation, string $className, string $target, string $targetName): void 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Server/TcpServer/Route/RouteResult.php: -------------------------------------------------------------------------------- 1 | routeItem = $routeItem; 31 | $this->params = $params; 32 | $this->callable = $routeItem->callable; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Server/UdpServer/Route/RouteResult.php: -------------------------------------------------------------------------------- 1 | routeItem = $routeItem; 31 | $this->params = $params; 32 | $this->callable = $routeItem->callable; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Db/Listener/WorkerStart.php: -------------------------------------------------------------------------------- 1 | getData(); 24 | $eventData['data']['component'] = [ 25 | 'components' => ComponentManager::getComponents(), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Model/Annotation/Relation/AutoUpdate.php: -------------------------------------------------------------------------------- 1 | controllerAnnotationClass = WSController::class; 21 | } 22 | 23 | /** 24 | * {@inheritDoc} 25 | */ 26 | public function parse(\Imi\Bean\Annotation\Base $annotation, string $className, string $target, string $targetName): void 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/RequestContextProxy/Annotation/RequestContextProxy.php: -------------------------------------------------------------------------------- 1 | controllerAnnotationClass = TcpController::class; 21 | } 22 | 23 | /** 24 | * {@inheritDoc} 25 | */ 26 | public function parse(\Imi\Bean\Annotation\Base $annotation, string $className, string $target, string $targetName): void 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Server/UdpServer/Parser/UdpControllerParser.php: -------------------------------------------------------------------------------- 1 | controllerAnnotationClass = UdpController::class; 21 | } 22 | 23 | /** 24 | * {@inheritDoc} 25 | */ 26 | public function parse(\Imi\Bean\Annotation\Base $annotation, string $className, string $target, string $targetName): void 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Event/EventItem.php: -------------------------------------------------------------------------------- 1 | callback = $callback; 35 | $this->priority = $priority; 36 | $this->oneTime = $oneTime; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Model/Annotation/Relation/AutoSelect.php: -------------------------------------------------------------------------------- 1 | logicalOperator; 19 | } 20 | 21 | public function setLogicalOperator(string $logicalOperator): void 22 | { 23 | $this->logicalOperator = $logicalOperator; 24 | } 25 | 26 | public function toString(IQuery $query): string 27 | { 28 | throw new \RuntimeException(sprintf('%s object can not be used as string', static::class)); // @codeCoverageIgnore 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Enum/Annotation/EnumItem.php: -------------------------------------------------------------------------------- 1 | getData(); 24 | $eventData['data']['aop'] = [ 25 | 'cache' => AopManager::getArrayCache(), 26 | 'dynamicRulesCache' => AopManager::getDynamicRulesCache(), 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Server/Http/Route/RouteResult.php: -------------------------------------------------------------------------------- 1 | id = $id; 34 | $this->routeItem = $routeItem; 35 | $this->params = $params; 36 | $this->callable = $routeItem->callable; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Server/View/Annotation/HtmlView.php: -------------------------------------------------------------------------------- 1 | setStatus(StatusCode::INTERNAL_SERVER_ERROR)->setBody(new MemoryStream('