├── .gitignore ├── vendor ├── ctfang │ └── proto-parser │ │ ├── README.md │ │ ├── test │ │ ├── proto │ │ │ ├── controllers │ │ │ │ ├── README.md │ │ │ │ └── home.proto │ │ │ └── http │ │ │ │ ├── service.proto │ │ │ │ └── methods.proto │ │ ├── main.php │ │ └── web │ │ │ └── index.html │ │ ├── src │ │ ├── FileParser │ │ │ ├── Base.php │ │ │ ├── SyntaxFileParser.php │ │ │ ├── PackageFileParser.php │ │ │ ├── ImportFileParser.php │ │ │ ├── OptionFileParser.php │ │ │ ├── ServiceFileParser.php │ │ │ ├── EnumFileParser.php │ │ │ ├── MessageFileParser.php │ │ │ ├── Service │ │ │ │ ├── Option.php │ │ │ │ └── Rpc.php │ │ │ └── Message │ │ │ │ └── Enum.php │ │ ├── ProtoType.php │ │ ├── DirsHelp.php │ │ └── Swagger │ │ │ ├── Tag.php │ │ │ └── Response.php │ │ ├── composer.json │ │ └── composer.lock ├── symfony │ ├── polyfill-php80 │ │ ├── Resources │ │ │ └── stubs │ │ │ │ ├── ValueError.php │ │ │ │ ├── UnhandledMatchError.php │ │ │ │ ├── Stringable.php │ │ │ │ └── Attribute.php │ │ ├── README.md │ │ ├── LICENSE │ │ ├── composer.json │ │ └── bootstrap.php │ ├── console │ │ ├── Resources │ │ │ └── bin │ │ │ │ └── hiddeninput.exe │ │ ├── Exception │ │ │ ├── LogicException.php │ │ │ ├── RuntimeException.php │ │ │ ├── ExceptionInterface.php │ │ │ ├── InvalidArgumentException.php │ │ │ ├── NamespaceNotFoundException.php │ │ │ ├── MissingInputException.php │ │ │ ├── InvalidOptionException.php │ │ │ └── CommandNotFoundException.php │ │ ├── Helper │ │ │ ├── TableSeparator.php │ │ │ ├── TableRows.php │ │ │ ├── InputAwareHelper.php │ │ │ ├── HelperInterface.php │ │ │ ├── TableCell.php │ │ │ ├── Dumper.php │ │ │ ├── TableCellStyle.php │ │ │ ├── DescriptorHelper.php │ │ │ ├── FormatterHelper.php │ │ │ └── HelperSet.php │ │ ├── Descriptor │ │ │ └── DescriptorInterface.php │ │ ├── Input │ │ │ ├── InputAwareInterface.php │ │ │ ├── StreamableInputInterface.php │ │ │ └── StringInput.php │ │ ├── README.md │ │ ├── Formatter │ │ │ ├── WrappableOutputFormatterInterface.php │ │ │ ├── OutputFormatterStyleInterface.php │ │ │ ├── NullOutputFormatterStyle.php │ │ │ ├── OutputFormatterInterface.php │ │ │ └── NullOutputFormatter.php │ │ ├── Command │ │ │ ├── SignalableCommandInterface.php │ │ │ ├── LockableTrait.php │ │ │ ├── ListCommand.php │ │ │ └── HelpCommand.php │ │ ├── Output │ │ │ ├── ConsoleOutputInterface.php │ │ │ ├── BufferedOutput.php │ │ │ └── TrimmedBufferOutput.php │ │ ├── Attribute │ │ │ └── AsCommand.php │ │ ├── Event │ │ │ ├── ConsoleSignalEvent.php │ │ │ ├── ConsoleTerminateEvent.php │ │ │ ├── ConsoleCommandEvent.php │ │ │ ├── ConsoleErrorEvent.php │ │ │ └── ConsoleEvent.php │ │ ├── CommandLoader │ │ │ ├── CommandLoaderInterface.php │ │ │ ├── FactoryCommandLoader.php │ │ │ └── ContainerCommandLoader.php │ │ ├── LICENSE │ │ ├── Question │ │ │ └── ConfirmationQuestion.php │ │ ├── SignalRegistry │ │ │ └── SignalRegistry.php │ │ ├── SingleCommandApplication.php │ │ ├── composer.json │ │ ├── Tester │ │ │ ├── ApplicationTester.php │ │ │ └── CommandTester.php │ │ └── ConsoleEvents.php │ ├── service-contracts │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── Attribute │ │ │ └── Required.php │ │ ├── LICENSE │ │ ├── ResetInterface.php │ │ ├── composer.json │ │ ├── ServiceProviderInterface.php │ │ ├── ServiceSubscriberTrait.php │ │ └── ServiceSubscriberInterface.php │ ├── deprecation-contracts │ │ ├── CHANGELOG.md │ │ ├── composer.json │ │ ├── function.php │ │ ├── LICENSE │ │ └── README.md │ ├── polyfill-php73 │ │ ├── Resources │ │ │ └── stubs │ │ │ │ └── JsonException.php │ │ ├── README.md │ │ ├── Php73.php │ │ ├── LICENSE │ │ ├── bootstrap.php │ │ └── composer.json │ ├── polyfill-ctype │ │ ├── README.md │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── bootstrap.php │ │ └── bootstrap80.php │ ├── string │ │ ├── Exception │ │ │ ├── ExceptionInterface.php │ │ │ ├── RuntimeException.php │ │ │ └── InvalidArgumentException.php │ │ ├── README.md │ │ ├── Slugger │ │ │ └── SluggerInterface.php │ │ ├── CHANGELOG.md │ │ ├── Resources │ │ │ └── functions.php │ │ ├── Inflector │ │ │ └── InflectorInterface.php │ │ ├── LICENSE │ │ └── composer.json │ ├── polyfill-mbstring │ │ ├── README.md │ │ ├── LICENSE │ │ └── composer.json │ ├── polyfill-intl-normalizer │ │ ├── README.md │ │ ├── Resources │ │ │ └── stubs │ │ │ │ └── Normalizer.php │ │ ├── bootstrap80.php │ │ ├── bootstrap.php │ │ ├── LICENSE │ │ └── composer.json │ └── polyfill-intl-grapheme │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── README.md │ │ └── bootstrap.php ├── autoload.php ├── composer │ ├── autoload_namespaces.php │ ├── platform_check.php │ ├── autoload_classmap.php │ ├── autoload_files.php │ ├── LICENSE │ ├── autoload_psr4.php │ └── autoload_real.php └── psr │ └── container │ ├── src │ ├── NotFoundExceptionInterface.php │ ├── ContainerExceptionInterface.php │ └── ContainerInterface.php │ ├── README.md │ ├── composer.json │ └── LICENSE ├── golang-parser ├── README.md └── src │ ├── Generate │ ├── template │ │ └── go │ ├── GoLangVar.php │ └── GoLangFunc.php │ ├── FileParser │ ├── GoVar.php │ ├── GoConst.php │ ├── Package.php │ ├── Parameter.php │ └── Import.php │ ├── GoLangType.php │ ├── FileParser.php │ └── ArrayToFileInfo.php ├── app ├── ProtoHelp │ ├── template │ │ ├── controller │ │ ├── route │ │ ├── route_group │ │ ├── grpc_handle │ │ ├── all_routes │ │ ├── grpc_func │ │ └── action │ ├── ProtoMethod.php │ ├── DirsHelp.php │ └── MysqlToProto.php ├── OrmHelp │ ├── MysqlColumn.php │ └── template │ │ ├── config_db │ │ ├── func │ │ ├── map │ │ ├── list_alias │ │ ├── with_has_many │ │ └── with_has_one ├── CurdHelp │ └── template │ │ ├── controller │ │ ├── del_action │ │ ├── put_action │ │ ├── post_action │ │ ├── get_action │ │ └── proto └── Go.php ├── composer.json ├── toolset ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/README.md: -------------------------------------------------------------------------------- 1 | # proto-parser 2 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/test/proto/controllers/README.md: -------------------------------------------------------------------------------- 1 | # 测试定义 -------------------------------------------------------------------------------- /golang-parser/README.md: -------------------------------------------------------------------------------- 1 | # home-toolset-php 2 | 使用php编写的go编译工具, 专门读取go源码到可读结构 3 | -------------------------------------------------------------------------------- /app/ProtoHelp/template/controller: -------------------------------------------------------------------------------- 1 | package {package} 2 | 3 | // @Bean 4 | type Controller struct { 5 | 6 | } -------------------------------------------------------------------------------- /golang-parser/src/Generate/template/go: -------------------------------------------------------------------------------- 1 | // 代码由home-admin生成, 不需要编辑它 2 | 3 | package {package} 4 | {import}{var}{func} 5 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | class JsonException extends Exception 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/README.md: -------------------------------------------------------------------------------- 1 | Symfony Service Contracts 2 | ========================= 3 | 4 | A set of abstractions extracted out of the Symfony components. 5 | 6 | Can be used to build on semantics that the Symfony components proved useful - and 7 | that already have battle tested implementations. 8 | 9 | See https://github.com/symfony/contracts/blob/main/README.md for more information. 10 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/SyntaxFileParser.php: -------------------------------------------------------------------------------- 1 | value = trim($arr[2], '"'); 17 | return $than; 18 | } 19 | } -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/test/proto/http/methods.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package http; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | option go_package = "github.com/go-ex/proto-help/http"; 8 | 9 | extend google.protobuf.MethodOptions { 10 | string Get = 50000; 11 | string Head = 50001; 12 | string Post = 50002; 13 | string Put = 50003; 14 | string Delete = 50004; 15 | string Options = 50005; 16 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Ctype 2 | ======================== 3 | 4 | This component provides `ctype_*` functions to users who run php versions without the ctype extension. 5 | 6 | More information can be found in the 7 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). 8 | 9 | License 10 | ======= 11 | 12 | This library is released under the [MIT license](LICENSE). 13 | -------------------------------------------------------------------------------- /vendor/symfony/string/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String\Exception; 13 | 14 | interface ExceptionInterface extends \Throwable 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-mbstring/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Mbstring 2 | =========================== 3 | 4 | This component provides a partial, native PHP implementation for the 5 | [Mbstring](https://php.net/mbstring) extension. 6 | 7 | More information can be found in the 8 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). 9 | 10 | License 11 | ======= 12 | 13 | This library is released under the [MIT license](LICENSE). 14 | -------------------------------------------------------------------------------- /app/OrmHelp/template/map: -------------------------------------------------------------------------------- 1 | func (l {name}List) MapWithOne(field string) map[interface{}]*{name} { 2 | data := make(map[interface{}]*{name}) 3 | for _, item := range l { 4 | switch field {{mapWithOneStr} 5 | } 6 | } 7 | return data 8 | } 9 | 10 | func (l {name}List) MapWithMany(field string) map[interface{}][]*{name} { 11 | data := make(map[interface{}][]*{name}) 12 | for _, item := range l { 13 | switch field {{mapWithManyStr}} 14 | } 15 | return data 16 | } 17 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cyz-home/home-toolset-php", 3 | "autoload": { 4 | "psr-4": { 5 | "App\\": "app/", 6 | "GoLang\\Parser\\": "golang-parser/src" 7 | } 8 | }, 9 | "authors": [ 10 | { 11 | "name": "cyz-home", 12 | "email": "2206582181@qq.com" 13 | } 14 | ], 15 | "require": { 16 | "symfony/console": "^5.3", 17 | "ext-json": "*", 18 | "ctfang/proto-parser": "^v0.0.6", 19 | "ext-mysqli": "*" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/string/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String\Exception; 13 | 14 | class RuntimeException extends \RuntimeException implements ExceptionInterface 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/ProtoType.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String\Exception; 13 | 14 | class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /app/ProtoHelp/template/all_routes: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "{gomodule}/bootstrap/http/route_help" 6 | ) 7 | 8 | // @Bean 9 | type Routes struct {{controller}} 10 | 11 | // 映射所有组=>地址 12 | func (r *Routes) GenRoutesConfig() map[string]route_help.GroupMap { 13 | return map[string]route_help.GroupMap{{group_map}} 14 | } 15 | 16 | func (r *Routes) Load(engine *gin.Engine, config []route_help.GroupConfig, help *route_help.RouteHelp) { 17 | help.Load(engine, config, r.GenRoutesConfig()) 18 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Intl: Normalizer 2 | =================================== 3 | 4 | This component provides a fallback implementation for the 5 | [`Normalizer`](https://php.net/Normalizer) class provided 6 | by the [Intl](https://php.net/intl) extension. 7 | 8 | More information can be found in the 9 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). 10 | 11 | License 12 | ======= 13 | 14 | This library is released under the [MIT license](LICENSE). 15 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * @author Jérôme Tamarelle 16 | */ 17 | class LogicException extends \LogicException implements ExceptionInterface 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * @author Jérôme Tamarelle 16 | */ 17 | class RuntimeException extends \RuntimeException implements ExceptionInterface 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /app/ProtoHelp/template/grpc_func: -------------------------------------------------------------------------------- 1 | 2 | func (a *{ControllerName}) {rpc}(ctx context.Context, request *{api}.{rpcReq}) (*g.{rpcResp}Grpc, error) { 3 | resp, err := a.controller.{rpc}(request, auth.NewContextFormGrpc(&ctx)) 4 | 5 | if err != nil { 6 | if value, ok := err.(*common.LogicError); ok { 7 | return &g.{rpcResp}Grpc{ 8 | Code: int32(value.Code), 9 | Message: value.Error(), 10 | Data: resp, 11 | }, err 12 | } 13 | } 14 | 15 | return &g.{rpcResp}Grpc{ 16 | Code: 0, 17 | Message: "", 18 | Data: resp, 19 | }, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/PackageFileParser.php: -------------------------------------------------------------------------------- 1 | value = trim($arr[2], '"'); 17 | return $than; 18 | } 19 | 20 | /** 21 | * @return mixed 22 | */ 23 | public function getValue() 24 | { 25 | return $this->value; 26 | } 27 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * ExceptionInterface. 16 | * 17 | * @author Jérôme Tamarelle 18 | */ 19 | interface ExceptionInterface extends \Throwable 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/ImportFileParser.php: -------------------------------------------------------------------------------- 1 | value[] = trim($arr2[2], '"'); 18 | } 19 | return $than; 20 | } 21 | 22 | public function get():array 23 | { 24 | return $this->value; 25 | } 26 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * @author Jérôme Tamarelle 16 | */ 17 | class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/OptionFileParser.php: -------------------------------------------------------------------------------- 1 | value[trim($arr2[2])] = trim($arr2[5], '"'); 18 | } 19 | return $than; 20 | } 21 | 22 | public function get():array 23 | { 24 | return $this->value; 25 | } 26 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/NamespaceNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * Represents an incorrect namespace typed in the console. 16 | * 17 | * @author Pierre du Plessis 18 | */ 19 | class NamespaceNotFoundException extends CommandNotFoundException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/MissingInputException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * Represents failure to read input from stdin. 16 | * 17 | * @author Gabriel Ostrolucký 18 | */ 19 | class MissingInputException extends RuntimeException implements ExceptionInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/string/README.md: -------------------------------------------------------------------------------- 1 | String Component 2 | ================ 3 | 4 | The String component provides an object-oriented API to strings and deals 5 | with bytes, UTF-8 code points and grapheme clusters in a unified way. 6 | 7 | Resources 8 | --------- 9 | 10 | * [Documentation](https://symfony.com/doc/current/components/string.html) 11 | * [Contributing](https://symfony.com/doc/current/contributing/index.html) 12 | * [Report issues](https://github.com/symfony/symfony/issues) and 13 | [send Pull Requests](https://github.com/symfony/symfony/pulls) 14 | in the [main Symfony repository](https://github.com/symfony/symfony) 15 | -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/InvalidOptionException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * Represents an incorrect option name typed in the console. 16 | * 17 | * @author Jérôme Tamarelle 18 | */ 19 | class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/psr/container/README.md: -------------------------------------------------------------------------------- 1 | Container interface 2 | ============== 3 | 4 | This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url]. 5 | 6 | Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container. 7 | 8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. 9 | 10 | [psr-url]: https://www.php-fig.org/psr/psr-11/ 11 | [package-url]: https://packagist.org/packages/psr/container 12 | [implementation-url]: https://packagist.org/providers/psr/container-implementation 13 | 14 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php73/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Php73 2 | ======================== 3 | 4 | This component provides functions added to PHP 7.3 core: 5 | 6 | - [`array_key_first`](https://php.net/array_key_first) 7 | - [`array_key_last`](https://php.net/array_key_last) 8 | - [`hrtime`](https://php.net/function.hrtime) 9 | - [`is_countable`](https://php.net/is_countable) 10 | - [`JsonException`](https://php.net/JsonException) 11 | 12 | More information can be found in the 13 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). 14 | 15 | License 16 | ======= 17 | 18 | This library is released under the [MIT license](LICENSE). 19 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php: -------------------------------------------------------------------------------- 1 | flags = $flags; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "810488ad6ece4dc69f6da1e1589c0f1f", 8 | "packages": [], 9 | "packages-dev": [], 10 | "aliases": [], 11 | "minimum-stability": "stable", 12 | "stability-flags": [], 13 | "prefer-stable": false, 14 | "prefer-lowest": false, 15 | "platform": [], 16 | "platform-dev": [], 17 | "plugin-api-version": "2.1.0" 18 | } 19 | -------------------------------------------------------------------------------- /vendor/psr/container/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr/container", 3 | "type": "library", 4 | "description": "Common Container Interface (PHP FIG PSR-11)", 5 | "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"], 6 | "homepage": "https://github.com/php-fig/container", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "PHP-FIG", 11 | "homepage": "https://www.php-fig.org/" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=7.4.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { 19 | "Psr\\Container\\": "src/" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/TableSeparator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * Marks a row as being a separator. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class TableSeparator extends TableCell 20 | { 21 | public function __construct(array $options = []) 22 | { 23 | parent::__construct('', $options); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/ServiceFileParser.php: -------------------------------------------------------------------------------- 1 | value[$message->getName()] = $message; 20 | } 21 | return $than; 22 | } 23 | 24 | /** 25 | * @return Service[] 26 | */ 27 | public function getArray(): array 28 | { 29 | return $this->value; 30 | } 31 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Descriptor/DescriptorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Descriptor; 13 | 14 | use Symfony\Component\Console\Output\OutputInterface; 15 | 16 | /** 17 | * Descriptor interface. 18 | * 19 | * @author Jean-François Simon 20 | */ 21 | interface DescriptorInterface 22 | { 23 | public function describe(OutputInterface $output, object $object, array $options = []); 24 | } 25 | -------------------------------------------------------------------------------- /app/Go.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Input; 13 | 14 | /** 15 | * InputAwareInterface should be implemented by classes that depends on the 16 | * Console Input. 17 | * 18 | * @author Wouter J 19 | */ 20 | interface InputAwareInterface 21 | { 22 | /** 23 | * Sets the Console Input. 24 | */ 25 | public function setInput(InputInterface $input); 26 | } 27 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/test/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReDoc 5 | 6 | 7 | 8 | 9 | 10 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/TableRows.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * @internal 16 | */ 17 | class TableRows implements \IteratorAggregate 18 | { 19 | private $generator; 20 | 21 | public function __construct(callable $generator) 22 | { 23 | $this->generator = $generator; 24 | } 25 | 26 | public function getIterator(): \Traversable 27 | { 28 | $g = $this->generator; 29 | 30 | return $g(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/EnumFileParser.php: -------------------------------------------------------------------------------- 1 | value[$message->getName()] = $message; 21 | } 22 | return $than; 23 | } 24 | 25 | public function get(): array 26 | { 27 | return $this->value; 28 | } 29 | 30 | public function getValues(): array 31 | { 32 | return $this->value; 33 | } 34 | } -------------------------------------------------------------------------------- /vendor/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 70400)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | $missingExtensions = array(); 12 | extension_loaded('json') || $missingExtensions[] = 'json'; 13 | extension_loaded('mysqli') || $missingExtensions[] = 'mysqli'; 14 | 15 | if ($missingExtensions) { 16 | $issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions); 17 | } 18 | 19 | if ($issues) { 20 | echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues); 21 | exit(104); 22 | } 23 | -------------------------------------------------------------------------------- /vendor/symfony/console/README.md: -------------------------------------------------------------------------------- 1 | Console Component 2 | ================= 3 | 4 | The Console component eases the creation of beautiful and testable command line 5 | interfaces. 6 | 7 | Resources 8 | --------- 9 | 10 | * [Documentation](https://symfony.com/doc/current/components/console.html) 11 | * [Contributing](https://symfony.com/doc/current/contributing/index.html) 12 | * [Report issues](https://github.com/symfony/symfony/issues) and 13 | [send Pull Requests](https://github.com/symfony/symfony/pulls) 14 | in the [main Symfony repository](https://github.com/symfony/symfony) 15 | 16 | Credits 17 | ------- 18 | 19 | `Resources/bin/hiddeninput.exe` is a third party binary provided within this 20 | component. Find sources and license at https://github.com/Seldaek/hidden-input. 21 | -------------------------------------------------------------------------------- /golang-parser/src/FileParser/GoVar.php: -------------------------------------------------------------------------------- 1 | doc = $doc; 18 | 19 | $arr = $this->onStopWithFirstStr($array, $offset, PHP_EOL); 20 | $arr = array_values($arr); 21 | if (isset($arr[2])) { 22 | $this->value = $arr[2]; 23 | } 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getValue(): string 30 | { 31 | return $this->value; 32 | } 33 | } -------------------------------------------------------------------------------- /golang-parser/src/FileParser/GoConst.php: -------------------------------------------------------------------------------- 1 | doc = $doc; 18 | 19 | $arr = $this->onStopWithFirstStr($array, $offset, PHP_EOL); 20 | $arr = array_values($arr); 21 | if (isset($arr[2])) { 22 | $this->value = $arr[2]; 23 | } 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getValue(): string 30 | { 31 | return $this->value; 32 | } 33 | } -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/Attribute/Required.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service\Attribute; 13 | 14 | /** 15 | * A required dependency. 16 | * 17 | * This attribute indicates that a property holds a required dependency. The annotated property or method should be 18 | * considered during the instantiation process of the containing class. 19 | * 20 | * @author Alexander M. Turek 21 | */ 22 | #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] 23 | final class Required 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /app/OrmHelp/template/list_alias: -------------------------------------------------------------------------------- 1 | func (l {name}List) GetTo{column_name}List() []{column_type} { 2 | {column_name}List := make([]{column_type}, 0) 3 | for _, d := range l { 4 | {column_name}List = append({column_name}List, d.{column_name}) 5 | } 6 | return {column_name}List 7 | } 8 | 9 | func (l {name}List) GetTo{column_name}Map() map[{column_type}]*{name} { 10 | {column_name}List := make(map[{column_type}]*{name}) 11 | for _, d := range l { 12 | {column_name}List[d.{column_name}] = d 13 | } 14 | return {column_name}List 15 | } 16 | 17 | func (l {name}List) GetTo{column_name}Distinct() []{column_type} { 18 | {column_name}List := make([]{column_type}, 0) 19 | for _, d := range l.GetTo{column_name}Map() { 20 | {column_name}List = append({column_name}List, d.{column_name}) 21 | } 22 | return {column_name}List 23 | } 24 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/bootstrap80.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Intl\Normalizer as p; 13 | 14 | if (!function_exists('normalizer_is_normalized')) { 15 | function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } 16 | } 17 | if (!function_exists('normalizer_normalize')) { 18 | function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter interface for console output that supports word wrapping. 16 | * 17 | * @author Roland Franssen 18 | */ 19 | interface WrappableOutputFormatterInterface extends OutputFormatterInterface 20 | { 21 | /** 22 | * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping). 23 | */ 24 | public function formatAndWrap(?string $message, int $width); 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/console/Command/SignalableCommandInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | /** 15 | * Interface for command reacting to signal. 16 | * 17 | * @author Grégoire Pineau 18 | */ 19 | interface SignalableCommandInterface 20 | { 21 | /** 22 | * Returns the list of signals to subscribe. 23 | */ 24 | public function getSubscribedSignals(): array; 25 | 26 | /** 27 | * The method will be called when the application is signaled. 28 | */ 29 | public function handleSignal(int $signal): void; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Intl\Normalizer as p; 13 | 14 | if (\PHP_VERSION_ID >= 80000) { 15 | return require __DIR__.'/bootstrap80.php'; 16 | } 17 | 18 | if (!function_exists('normalizer_is_normalized')) { 19 | function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } 20 | } 21 | if (!function_exists('normalizer_normalize')) { 22 | function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/symfony/string/Slugger/SluggerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String\Slugger; 13 | 14 | use Symfony\Component\String\AbstractUnicodeString; 15 | 16 | /** 17 | * Creates a URL-friendly slug from a given string. 18 | * 19 | * @author Titouan Galopin 20 | */ 21 | interface SluggerInterface 22 | { 23 | /** 24 | * Creates a slug for the given string and locale, using appropriate transliteration when needed. 25 | */ 26 | public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString; 27 | } 28 | -------------------------------------------------------------------------------- /app/OrmHelp/template/with_has_many: -------------------------------------------------------------------------------- 1 | func (receiver *{name}) With{FuncName}(wheres ...interface{}) *{name} { 2 | con := receiver.Model() 3 | con.wheresSession = append(con.wheresSession, func() { 4 | con.{other} = make([]*{other_orm}, 0) 5 | ids := con.list.GetTo{source_key}Distinct() 6 | if len(ids) > 0 { 7 | otherOrm := New{other_orm}().WhereIn("{other_key}", ids) 8 | if len(wheres) >= 2 { 9 | otherOrm.Where(wheres[0], wheres[1:]...) 10 | } 11 | others := otherOrm.Find() 12 | for _, source := range con.list { 13 | for _, other := range others { 14 | if other.{other_key_by_camel} == source.{source_key} { 15 | source.{other} = append(source.{other}, other) 16 | } 17 | } 18 | } 19 | } 20 | }) 21 | return con 22 | } 23 | 24 | func (receiver *{name}) GetWith{FuncName}() []*{other_orm} { 25 | return receiver.{other} 26 | } 27 | -------------------------------------------------------------------------------- /toolset: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | addCommands([ 22 | new BeanCommand(), 23 | new ProtocCommand(), 24 | new SwaggerCommand(), 25 | new RouteCommand(), 26 | new OrmCommand(), 27 | new CurlCommand(), 28 | ]); 29 | 30 | try { 31 | $application->run(); 32 | } catch (Exception $e) { 33 | var_dump($e); 34 | } 35 | -------------------------------------------------------------------------------- /vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', 10 | 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 11 | 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 12 | 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 13 | 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', 14 | 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 15 | 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', 16 | ); 17 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/MessageFileParser.php: -------------------------------------------------------------------------------- 1 | value[$message->getName()] = $message; 21 | } 22 | return $than; 23 | } 24 | 25 | /** 26 | * @return Type[] 27 | */ 28 | public function get(): array 29 | { 30 | return $this->value; 31 | } 32 | 33 | /** 34 | * @return Type[] 35 | */ 36 | public function getValues(): array 37 | { 38 | return $this->value; 39 | } 40 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Php80 2 | ======================== 3 | 4 | This component provides features added to PHP 8.0 core: 5 | 6 | - `Stringable` interface 7 | - [`fdiv`](https://php.net/fdiv) 8 | - `ValueError` class 9 | - `UnhandledMatchError` class 10 | - `FILTER_VALIDATE_BOOL` constant 11 | - [`get_debug_type`](https://php.net/get_debug_type) 12 | - [`preg_last_error_msg`](https://php.net/preg_last_error_msg) 13 | - [`str_contains`](https://php.net/str_contains) 14 | - [`str_starts_with`](https://php.net/str_starts_with) 15 | - [`str_ends_with`](https://php.net/str_ends_with) 16 | - [`get_resource_id`](https://php.net/get_resource_id) 17 | 18 | More information can be found in the 19 | [main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). 20 | 21 | License 22 | ======= 23 | 24 | This library is released under the [MIT license](LICENSE). 25 | -------------------------------------------------------------------------------- /app/ProtoHelp/template/action: -------------------------------------------------------------------------------- 1 | package {package} 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "{gomod}/app/common/auth" 6 | "{gomod}/app/providers" 7 | "{gomod}/generate/proto/{impload_package}" 8 | ) 9 | 10 | // {name} {doc} 11 | func (receiver *Controller) {name}(req *{proto_package}.{req}, ctx *auth.Context) (*{proto_package}.{resp}, error) { 12 | // TODO 这里写业务 13 | return &{proto_package}.{resp}{}, nil 14 | } 15 | 16 | // GinHandle{name} gin原始路由处理 17 | // {route_help} 18 | func (receiver *Controller) GinHandle{name}(ctx *gin.Context) { 19 | req := &{proto_package}.{req}{} 20 | err := ctx.ShouldBind(req) 21 | 22 | if err != nil { 23 | providers.ErrorRequest(ctx, err) 24 | return 25 | } 26 | 27 | resp, err := receiver.{name}(req, auth.NewContext(ctx)) 28 | if err != nil { 29 | providers.ErrorResponse(ctx, err) 30 | return 31 | } 32 | 33 | providers.SuccessResponse(ctx, resp) 34 | } -------------------------------------------------------------------------------- /golang-parser/src/Generate/GoLangVar.php: -------------------------------------------------------------------------------- 1 | getName()} {$this->getType()}"; 13 | } 14 | 15 | /** 16 | * @return mixed 17 | */ 18 | public function getName() 19 | { 20 | return $this->name; 21 | } 22 | 23 | /** 24 | * @param mixed $name 25 | */ 26 | public function setName($name): void 27 | { 28 | $this->name = $name; 29 | } 30 | 31 | /** 32 | * @return mixed 33 | */ 34 | public function getType() 35 | { 36 | return $this->type; 37 | } 38 | 39 | /** 40 | * @param mixed $type 41 | */ 42 | public function setType($type): void 43 | { 44 | $this->type = $type; 45 | } 46 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/InputAwareHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Input\InputAwareInterface; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | 17 | /** 18 | * An implementation of InputAwareInterface for Helpers. 19 | * 20 | * @author Wouter J 21 | */ 22 | abstract class InputAwareHelper extends Helper implements InputAwareInterface 23 | { 24 | protected $input; 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function setInput(InputInterface $input) 30 | { 31 | $this->input = $input; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/string/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 5.3 5 | --- 6 | 7 | * Made `AsciiSlugger` fallback to parent locale's symbolsMap 8 | 9 | 5.2.0 10 | ----- 11 | 12 | * added a `FrenchInflector` class 13 | 14 | 5.1.0 15 | ----- 16 | 17 | * added the `AbstractString::reverse()` method 18 | * made `AbstractString::width()` follow POSIX.1-2001 19 | * added `LazyString` which provides memoizing stringable objects 20 | * The component is not marked as `@experimental` anymore 21 | * added the `s()` helper method to get either an `UnicodeString` or `ByteString` instance, 22 | depending of the input string UTF-8 compliancy 23 | * added `$cut` parameter to `Symfony\Component\String\AbstractString::truncate()` 24 | * added `AbstractString::containsAny()` 25 | * allow passing a string of custom characters to `ByteString::fromRandom()` 26 | 27 | 5.0.0 28 | ----- 29 | 30 | * added the component as experimental 31 | -------------------------------------------------------------------------------- /golang-parser/src/FileParser/Package.php: -------------------------------------------------------------------------------- 1 | doc = $doc; 18 | 19 | $arr = $this->onStopWithFirstStr($array, $offset, PHP_EOL); 20 | $arr = array_values($arr); 21 | if (isset($arr[2])) { 22 | $this->value = $arr[2]; 23 | } 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getValue(): string 30 | { 31 | return $this->value; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getDoc(): string 38 | { 39 | return $this->doc; 40 | } 41 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Output/ConsoleOutputInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | /** 15 | * ConsoleOutputInterface is the interface implemented by ConsoleOutput class. 16 | * This adds information about stderr and section output stream. 17 | * 18 | * @author Dariusz Górecki 19 | */ 20 | interface ConsoleOutputInterface extends OutputInterface 21 | { 22 | /** 23 | * Gets the OutputInterface for errors. 24 | * 25 | * @return OutputInterface 26 | */ 27 | public function getErrorOutput(); 28 | 29 | public function setErrorOutput(OutputInterface $error); 30 | 31 | public function section(): ConsoleSectionOutput; 32 | } 33 | -------------------------------------------------------------------------------- /app/CurdHelp/template/del_action: -------------------------------------------------------------------------------- 1 | package {controller} 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "{gomodule}/app/common/auth" 6 | "{gomodule}/app/providers" 7 | "{gomodule}/generate/proto/{app}/{model}" 8 | ) 9 | 10 | // Del 删除数据 - {controller_doc} 11 | func (receiver *Controller) Del(req *{model}.{controller_name}PutRequest, ctx *auth.Context) (*{model}.{controller_name}PutResponse, error) { 12 | id := ctx.GetParamId() 13 | receiver.orm.Delete(id) 14 | return &{model}.{controller_name}PutResponse{ 15 | Tip: "OK", 16 | }, nil 17 | } 18 | 19 | // GinHandleDel gin原始路由处理 20 | func (receiver *Controller) GinHandleDel(ctx *gin.Context) { 21 | req := &{model}.{controller_name}PutRequest{} 22 | err := ctx.ShouldBind(req) 23 | 24 | if err != nil { 25 | providers.ErrorRequest(ctx, err) 26 | return 27 | } 28 | 29 | resp, err := receiver.Del(req, auth.NewContext(ctx)) 30 | if err != nil { 31 | providers.ErrorResponse(ctx, err) 32 | return 33 | } 34 | 35 | providers.SuccessResponse(ctx, resp) 36 | } -------------------------------------------------------------------------------- /vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 10 | 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', 11 | '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 12 | '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', 13 | 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 14 | '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', 15 | '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', 16 | 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', 17 | ); 18 | -------------------------------------------------------------------------------- /vendor/symfony/deprecation-contracts/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/deprecation-contracts", 3 | "type": "library", 4 | "description": "A generic function and convention to trigger deprecation notices", 5 | "homepage": "https://symfony.com", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "Nicolas Grekas", 10 | "email": "p@tchwork.com" 11 | }, 12 | { 13 | "name": "Symfony Community", 14 | "homepage": "https://symfony.com/contributors" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=7.1" 19 | }, 20 | "autoload": { 21 | "files": [ 22 | "function.php" 23 | ] 24 | }, 25 | "minimum-stability": "dev", 26 | "extra": { 27 | "branch-alias": { 28 | "dev-main": "2.4-dev" 29 | }, 30 | "thanks": { 31 | "name": "symfony/contracts", 32 | "url": "https://github.com/symfony/contracts" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/symfony/string/Resources/functions.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String; 13 | 14 | if (!\function_exists(u::class)) { 15 | function u(?string $string = ''): UnicodeString 16 | { 17 | return new UnicodeString($string ?? ''); 18 | } 19 | } 20 | 21 | if (!\function_exists(b::class)) { 22 | function b(?string $string = ''): ByteString 23 | { 24 | return new ByteString($string ?? ''); 25 | } 26 | } 27 | 28 | if (!\function_exists(s::class)) { 29 | /** 30 | * @return UnicodeString|ByteString 31 | */ 32 | function s(?string $string = ''): AbstractString 33 | { 34 | $string = $string ?? ''; 35 | 36 | return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/OrmHelp/template/with_has_one: -------------------------------------------------------------------------------- 1 | // 表依赖 2 | func (receiver *{name}) With{FuncName}(wheres ...interface{}) *{name} { 3 | con := receiver.Model() 4 | con.wheresSession = append(con.wheresSession, func() { 5 | ids := con.list.GetTo{source_key}Distinct() 6 | if len(ids) > 0 { 7 | otherOrm := New{other_orm}().WhereIn("{other_key}", ids) 8 | if len(wheres) >= 2 { 9 | otherOrm.Where(wheres[0], wheres[1:]...) 10 | } 11 | others := otherOrm.Find().MapWithOne("{other_key}") 12 | for _, source := range con.list { 13 | v, ok := others[source.{source_key}] 14 | if ok { 15 | source.{other} = v 16 | } 17 | } 18 | } 19 | }) 20 | return con 21 | } 22 | // 获取表依赖, make = true 如果依赖不存在, 也构建一个空对象返回 23 | func (receiver *{name}) GetWith{FuncName}(make ...bool) *{other_orm} { 24 | data := receiver.{other} 25 | if len(make) >= 1 { 26 | if !data.Has() { 27 | data = &{other_orm}{} 28 | } 29 | } 30 | return data 31 | } 32 | -------------------------------------------------------------------------------- /vendor/symfony/console/Attribute/AsCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Attribute; 13 | 14 | /** 15 | * Service tag to autoconfigure commands. 16 | */ 17 | #[\Attribute(\Attribute::TARGET_CLASS)] 18 | class AsCommand 19 | { 20 | public function __construct( 21 | public string $name, 22 | public ?string $description = null, 23 | array $aliases = [], 24 | bool $hidden = false, 25 | ) { 26 | if (!$hidden && !$aliases) { 27 | return; 28 | } 29 | 30 | $name = explode('|', $name); 31 | $name = array_merge($name, $aliases); 32 | 33 | if ($hidden && '' !== $name[0]) { 34 | array_unshift($name, ''); 35 | } 36 | 37 | $this->name = implode('|', $name); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/symfony/console/Input/StreamableInputInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Input; 13 | 14 | /** 15 | * StreamableInputInterface is the interface implemented by all input classes 16 | * that have an input stream. 17 | * 18 | * @author Robin Chalas 19 | */ 20 | interface StreamableInputInterface extends InputInterface 21 | { 22 | /** 23 | * Sets the input stream to read from when interacting with the user. 24 | * 25 | * This is mainly useful for testing purpose. 26 | * 27 | * @param resource $stream The input stream 28 | */ 29 | public function setStream($stream); 30 | 31 | /** 32 | * Returns the input stream. 33 | * 34 | * @return resource|null 35 | */ 36 | public function getStream(); 37 | } 38 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php73/Php73.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Polyfill\Php73; 13 | 14 | /** 15 | * @author Gabriel Caruso 16 | * @author Ion Bazan 17 | * 18 | * @internal 19 | */ 20 | final class Php73 21 | { 22 | public static $startAt = 1533462603; 23 | 24 | /** 25 | * @param bool $asNum 26 | * 27 | * @return array|float|int 28 | */ 29 | public static function hrtime($asNum = false) 30 | { 31 | $ns = microtime(false); 32 | $s = substr($ns, 11) - self::$startAt; 33 | $ns = 1E9 * (float) $ns; 34 | 35 | if ($asNum) { 36 | $ns += $s * 1E9; 37 | 38 | return \PHP_INT_SIZE === 4 ? $ns : (int) $ns; 39 | } 40 | 41 | return [$s, (int) $ns]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/HelperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * HelperInterface is the interface all helpers must implement. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface HelperInterface 20 | { 21 | /** 22 | * Sets the helper set associated with this helper. 23 | */ 24 | public function setHelperSet(HelperSet $helperSet = null); 25 | 26 | /** 27 | * Gets the helper set associated with this helper. 28 | * 29 | * @return HelperSet A HelperSet instance 30 | */ 31 | public function getHelperSet(); 32 | 33 | /** 34 | * Returns the canonical name of this helper. 35 | * 36 | * @return string The canonical name 37 | */ 38 | public function getName(); 39 | } 40 | -------------------------------------------------------------------------------- /vendor/symfony/console/Output/BufferedOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | /** 15 | * @author Jean-François Simon 16 | */ 17 | class BufferedOutput extends Output 18 | { 19 | private $buffer = ''; 20 | 21 | /** 22 | * Empties buffer and returns its content. 23 | * 24 | * @return string 25 | */ 26 | public function fetch() 27 | { 28 | $content = $this->buffer; 29 | $this->buffer = ''; 30 | 31 | return $content; 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | protected function doWrite(string $message, bool $newline) 38 | { 39 | $this->buffer .= $message; 40 | 41 | if ($newline) { 42 | $this->buffer .= \PHP_EOL; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/symfony/string/Inflector/InflectorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\String\Inflector; 13 | 14 | interface InflectorInterface 15 | { 16 | /** 17 | * Returns the singular forms of a string. 18 | * 19 | * If the method can't determine the form with certainty, several possible singulars are returned. 20 | * 21 | * @return string[] An array of possible singular forms 22 | */ 23 | public function singularize(string $plural): array; 24 | 25 | /** 26 | * Returns the plural forms of a string. 27 | * 28 | * If the method can't determine the form with certainty, several possible plurals are returned. 29 | * 30 | * @return string[] An array of possible plural forms 31 | */ 32 | public function pluralize(string $singular): array; 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/console/Event/ConsoleSignalEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * @author marie 20 | */ 21 | final class ConsoleSignalEvent extends ConsoleEvent 22 | { 23 | private $handlingSignal; 24 | 25 | public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal) 26 | { 27 | parent::__construct($command, $input, $output); 28 | $this->handlingSignal = $handlingSignal; 29 | } 30 | 31 | public function getHandlingSignal(): int 32 | { 33 | return $this->handlingSignal; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/symfony/console/CommandLoader/CommandLoaderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\CommandLoader; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Exception\CommandNotFoundException; 16 | 17 | /** 18 | * @author Robin Chalas 19 | */ 20 | interface CommandLoaderInterface 21 | { 22 | /** 23 | * Loads a command. 24 | * 25 | * @return Command 26 | * 27 | * @throws CommandNotFoundException 28 | */ 29 | public function get(string $name); 30 | 31 | /** 32 | * Checks if a command exists. 33 | * 34 | * @return bool 35 | */ 36 | public function has(string $name); 37 | 38 | /** 39 | * @return string[] All registered command names 40 | */ 41 | public function getNames(); 42 | } 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 cyz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/symfony/console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2021 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/deprecation-contracts/function.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | if (!function_exists('trigger_deprecation')) { 13 | /** 14 | * Triggers a silenced deprecation notice. 15 | * 16 | * @param string $package The name of the Composer package that is triggering the deprecation 17 | * @param string $version The version of the package that introduced the deprecation 18 | * @param string $message The message of the deprecation 19 | * @param mixed ...$args Values to insert in the message using printf() formatting 20 | * 21 | * @author Nicolas Grekas 22 | */ 23 | function trigger_deprecation(string $package, string $version, string $message, ...$args): void 24 | { 25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/string/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019-2021 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2019 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php73/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2019 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-mbstring/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2019 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2021 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ResetInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | /** 15 | * Provides a way to reset an object to its initial state. 16 | * 17 | * When calling the "reset()" method on an object, it should be put back to its 18 | * initial state. This usually means clearing any internal buffers and forwarding 19 | * the call to internal dependencies. All properties of the object should be put 20 | * back to the same state it had when it was first ready to use. 21 | * 22 | * This method could be called, for example, to recycle objects that are used as 23 | * services, so that they can be used to handle several requests in the same 24 | * process loop (note that we advise making your services stateless instead of 25 | * implementing this interface when possible.) 26 | */ 27 | interface ResetInterface 28 | { 29 | public function reset(); 30 | } 31 | -------------------------------------------------------------------------------- /vendor/symfony/deprecation-contracts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020-2021 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-grapheme/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2019 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2019 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php73/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Php73 as p; 13 | 14 | if (\PHP_VERSION_ID >= 70300) { 15 | return; 16 | } 17 | 18 | if (!function_exists('is_countable')) { 19 | function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; } 20 | } 21 | if (!function_exists('hrtime')) { 22 | require_once __DIR__.'/Php73.php'; 23 | p\Php73::$startAt = (int) microtime(true); 24 | function hrtime($as_number = false) { return p\Php73::hrtime($as_number); } 25 | } 26 | if (!function_exists('array_key_first')) { 27 | function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } 28 | } 29 | if (!function_exists('array_key_last')) { 30 | function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php73/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/polyfill-php73", 3 | "type": "library", 4 | "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", 5 | "keywords": ["polyfill", "shim", "compatibility", "portable"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Nicolas Grekas", 11 | "email": "p@tchwork.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.1" 20 | }, 21 | "autoload": { 22 | "psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, 23 | "files": [ "bootstrap.php" ], 24 | "classmap": [ "Resources/stubs" ] 25 | }, 26 | "minimum-stability": "dev", 27 | "extra": { 28 | "branch-alias": { 29 | "dev-main": "1.23-dev" 30 | }, 31 | "thanks": { 32 | "name": "symfony/polyfill", 33 | "url": "https://github.com/symfony/polyfill" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/Service/Option.php: -------------------------------------------------------------------------------- 1 | doc, "//"); 19 | } 20 | 21 | /** 22 | * @param string $doc 23 | */ 24 | public function setDoc($doc): void 25 | { 26 | $this->doc = $doc; 27 | } 28 | 29 | /** 30 | * @return string 31 | */ 32 | public function getKey() 33 | { 34 | return $this->key; 35 | } 36 | 37 | /** 38 | * @param string $key 39 | */ 40 | public function setKey($key): void 41 | { 42 | $this->key = $key; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getValue() 49 | { 50 | return $this->value; 51 | } 52 | 53 | /** 54 | * @param string|array $value 55 | */ 56 | public function setValue($value): void 57 | { 58 | $this->value = $value; 59 | } 60 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/polyfill-ctype", 3 | "type": "library", 4 | "description": "Symfony polyfill for ctype functions", 5 | "keywords": ["polyfill", "compatibility", "portable", "ctype"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Gert de Pagter", 11 | "email": "BackEndTea@gmail.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.1" 20 | }, 21 | "autoload": { 22 | "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, 23 | "files": [ "bootstrap.php" ] 24 | }, 25 | "suggest": { 26 | "ext-ctype": "For best performance" 27 | }, 28 | "minimum-stability": "dev", 29 | "extra": { 30 | "branch-alias": { 31 | "dev-main": "1.23-dev" 32 | }, 33 | "thanks": { 34 | "name": "symfony/polyfill", 35 | "url": "https://github.com/symfony/polyfill" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/CurdHelp/template/put_action: -------------------------------------------------------------------------------- 1 | package {controller} 2 | 3 | import ( 4 | "errors" 5 | "github.com/gin-gonic/gin" 6 | "{gomodule}/app/common/auth" 7 | "{gomodule}/app/providers" 8 | "{gomodule}/generate/proto/{app}/{model}" 9 | ) 10 | 11 | // Put 更新数据 - {controller_doc} 12 | func (receiver *Controller) Put(req *{model}.{controller_name}PutRequest, ctx *auth.Context) (*{model}.{controller_name}PutResponse, error) { 13 | id := ctx.GetParamId() 14 | has := receiver.orm.WhereId(id).First() 15 | if has == nil { 16 | return nil, errors.New("数据不存在") 17 | } 18 | receiver.orm.WhereId(id).Updates(map[string]interface{}{ 19 | {update_str} 20 | }) 21 | return &{model}.{controller_name}PutResponse{}, nil 22 | } 23 | 24 | // GinHandlePut gin原始路由处理 25 | func (receiver *Controller) GinHandlePut(ctx *gin.Context) { 26 | req := &{model}.{controller_name}PutRequest{} 27 | err := ctx.ShouldBind(req) 28 | 29 | if err != nil { 30 | providers.ErrorRequest(ctx, err) 31 | return 32 | } 33 | 34 | resp, err := receiver.Put(req, auth.NewContext(ctx)) 35 | if err != nil { 36 | providers.ErrorResponse(ctx, err) 37 | return 38 | } 39 | 40 | providers.SuccessResponse(ctx, resp) 41 | } -------------------------------------------------------------------------------- /app/CurdHelp/template/post_action: -------------------------------------------------------------------------------- 1 | package {controller} 2 | 3 | import ( 4 | "errors" 5 | "github.com/gin-gonic/gin" 6 | "{gomodule}/app/common/auth" 7 | "{gomodule}/app/providers" 8 | "{gomodule}/generate/proto/{app}/{model}" 9 | ) 10 | 11 | // Post 创建新数据 - {controller_doc} 12 | func (receiver *Controller) Post(req *{model}.{controller_name}PostRequest, ctx *auth.Context) (*{model}.{controller_name}PostResponse, error) { 13 | id := ctx.GetParamId() 14 | has := receiver.orm.WhereId(id).First() 15 | if has == nil { 16 | return nil, errors.New("数据不存在") 17 | } 18 | receiver.orm.WhereId(id).Updates(map[string]interface{}{ 19 | {update_str} 20 | }) 21 | return &{model}.{controller_name}PostResponse{}, nil 22 | } 23 | 24 | // GinHandlePost gin原始路由处理 25 | func (receiver *Controller) GinHandlePost(ctx *gin.Context) { 26 | req := &{model}.{controller_name}PostRequest{} 27 | err := ctx.ShouldBind(req) 28 | 29 | if err != nil { 30 | providers.ErrorRequest(ctx, err) 31 | return 32 | } 33 | 34 | resp, err := receiver.Post(req, auth.NewContext(ctx)) 35 | if err != nil { 36 | providers.ErrorResponse(ctx, err) 37 | return 38 | } 39 | 40 | providers.SuccessResponse(ctx, resp) 41 | } -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/DirsHelp.php: -------------------------------------------------------------------------------- 1 | =7.1" 20 | }, 21 | "autoload": { 22 | "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, 23 | "files": [ "bootstrap.php" ] 24 | }, 25 | "suggest": { 26 | "ext-mbstring": "For best performance" 27 | }, 28 | "minimum-stability": "dev", 29 | "extra": { 30 | "branch-alias": { 31 | "dev-main": "1.23-dev" 32 | }, 33 | "thanks": { 34 | "name": "symfony/polyfill", 35 | "url": "https://github.com/symfony/polyfill" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/psr/container/src/ContainerInterface.php: -------------------------------------------------------------------------------- 1 | =7.1" 20 | }, 21 | "autoload": { 22 | "psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" }, 23 | "files": [ "bootstrap.php" ] 24 | }, 25 | "suggest": { 26 | "ext-intl": "For best performance" 27 | }, 28 | "minimum-stability": "dev", 29 | "extra": { 30 | "branch-alias": { 31 | "dev-main": "1.23-dev" 32 | }, 33 | "thanks": { 34 | "name": "symfony/polyfill", 35 | "url": "https://github.com/symfony/polyfill" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/service-contracts", 3 | "type": "library", 4 | "description": "Generic abstractions related to writing services", 5 | "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Nicolas Grekas", 11 | "email": "p@tchwork.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.2.5", 20 | "psr/container": "^1.1" 21 | }, 22 | "suggest": { 23 | "symfony/service-implementation": "" 24 | }, 25 | "autoload": { 26 | "psr-4": { "Symfony\\Contracts\\Service\\": "" } 27 | }, 28 | "minimum-stability": "dev", 29 | "extra": { 30 | "branch-alias": { 31 | "dev-main": "2.4-dev" 32 | }, 33 | "thanks": { 34 | "name": "symfony/contracts", 35 | "url": "https://github.com/symfony/contracts" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/psr/container/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2016 container-interop 4 | Copyright (c) 2016 PHP Framework Interoperability Group 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/symfony/polyfill-php80'), 10 | 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), 11 | 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 12 | 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), 13 | 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'), 14 | 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), 15 | 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), 16 | 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'), 17 | 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 18 | 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 19 | 'ProtoParser\\' => array($vendorDir . '/ctfang/proto-parser/src'), 20 | 'GoLang\\Parser\\' => array($baseDir . '/golang-parser/src'), 21 | 'App\\' => array($baseDir . '/app'), 22 | ); 23 | -------------------------------------------------------------------------------- /vendor/symfony/console/Event/ConsoleTerminateEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * Allows to manipulate the exit code of a command after its execution. 20 | * 21 | * @author Francesco Levorato 22 | */ 23 | final class ConsoleTerminateEvent extends ConsoleEvent 24 | { 25 | private $exitCode; 26 | 27 | public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode) 28 | { 29 | parent::__construct($command, $input, $output); 30 | 31 | $this->setExitCode($exitCode); 32 | } 33 | 34 | public function setExitCode(int $exitCode): void 35 | { 36 | $this->exitCode = $exitCode; 37 | } 38 | 39 | public function getExitCode(): int 40 | { 41 | return $this->exitCode; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/polyfill-php80", 3 | "type": "library", 4 | "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", 5 | "keywords": ["polyfill", "shim", "compatibility", "portable"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Ion Bazan", 11 | "email": "ion.bazan@gmail.com" 12 | }, 13 | { 14 | "name": "Nicolas Grekas", 15 | "email": "p@tchwork.com" 16 | }, 17 | { 18 | "name": "Symfony Community", 19 | "homepage": "https://symfony.com/contributors" 20 | } 21 | ], 22 | "require": { 23 | "php": ">=7.1" 24 | }, 25 | "autoload": { 26 | "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, 27 | "files": [ "bootstrap.php" ], 28 | "classmap": [ "Resources/stubs" ] 29 | }, 30 | "minimum-stability": "dev", 31 | "extra": { 32 | "branch-alias": { 33 | "dev-main": "1.23-dev" 34 | }, 35 | "thanks": { 36 | "name": "symfony/polyfill", 37 | "url": "https://github.com/symfony/polyfill" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/CurdHelp/template/get_action: -------------------------------------------------------------------------------- 1 | package {controller} 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "{gomodule}/app/common/auth" 6 | "{gomodule}/app/providers" 7 | "{gomodule}/generate/proto/{app}/{model}" 8 | ) 9 | 10 | // Get 列表查询 - {controller_doc} 11 | func (receiver *Controller) Get(req *{model}.{controller_name}GetRequest, ctx *auth.Context) (*{model}.{controller_name}GetResponse, error) { 12 | list, total := receiver.orm.GetPaginate(req.Page, req.Limit) 13 | 14 | responseList := make([]*{model}.{table_info_name}, 0) 15 | for _, cp := range list { 16 | responseList = append( 17 | responseList, 18 | &{model}.{table_info_name}{ 19 | {table_copy_api} 20 | }, 21 | ) 22 | } 23 | return &{model}.{controller_name}GetResponse{ 24 | List: responseList, 25 | Total: uint32(total), 26 | }, nil 27 | } 28 | 29 | // GinHandleGet gin原始路由处理 30 | func (receiver *Controller) GinHandleGet(ctx *gin.Context) { 31 | req := &{model}.{controller_name}GetRequest{} 32 | err := ctx.ShouldBind(req) 33 | 34 | if err != nil { 35 | providers.ErrorRequest(ctx, err) 36 | return 37 | } 38 | 39 | resp, err := receiver.Get(req, auth.NewContext(ctx)) 40 | if err != nil { 41 | providers.ErrorResponse(ctx, err) 42 | return 43 | } 44 | 45 | providers.SuccessResponse(ctx, resp) 46 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-normalizer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/polyfill-intl-normalizer", 3 | "type": "library", 4 | "description": "Symfony polyfill for intl's Normalizer class and related functions", 5 | "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Nicolas Grekas", 11 | "email": "p@tchwork.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.1" 20 | }, 21 | "autoload": { 22 | "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, 23 | "files": [ "bootstrap.php" ], 24 | "classmap": [ "Resources/stubs" ] 25 | }, 26 | "suggest": { 27 | "ext-intl": "For best performance" 28 | }, 29 | "minimum-stability": "dev", 30 | "extra": { 31 | "branch-alias": { 32 | "dev-main": "1.23-dev" 33 | }, 34 | "thanks": { 35 | "name": "symfony/polyfill", 36 | "url": "https://github.com/symfony/polyfill" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /golang-parser/src/GoLangType.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter style interface for defining styles. 16 | * 17 | * @author Konstantin Kudryashov 18 | */ 19 | interface OutputFormatterStyleInterface 20 | { 21 | /** 22 | * Sets style foreground color. 23 | */ 24 | public function setForeground(string $color = null); 25 | 26 | /** 27 | * Sets style background color. 28 | */ 29 | public function setBackground(string $color = null); 30 | 31 | /** 32 | * Sets some specific style option. 33 | */ 34 | public function setOption(string $option); 35 | 36 | /** 37 | * Unsets some specific style option. 38 | */ 39 | public function unsetOption(string $option); 40 | 41 | /** 42 | * Sets multiple style options at once. 43 | */ 44 | public function setOptions(array $options); 45 | 46 | /** 47 | * Applies the style to a given text. 48 | * 49 | * @return string 50 | */ 51 | public function apply(string $text); 52 | } 53 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ServiceProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | use Psr\Container\ContainerInterface; 15 | 16 | /** 17 | * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. 18 | * 19 | * @author Nicolas Grekas 20 | * @author Mateusz Sip 21 | */ 22 | interface ServiceProviderInterface extends ContainerInterface 23 | { 24 | /** 25 | * Returns an associative array of service types keyed by the identifiers provided by the current container. 26 | * 27 | * Examples: 28 | * 29 | * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface 30 | * * ['foo' => '?'] means the container provides service name "foo" of unspecified type 31 | * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null 32 | * 33 | * @return string[] The provided service types, keyed by service names 34 | */ 35 | public function getProvidedServices(): array; 36 | } 37 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/test/proto/controllers/home.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package controllers; 4 | 5 | import "methods.proto"; 6 | import "service.proto"; 7 | 8 | option go_package = "/controllers"; 9 | 10 | service Home { 11 | // 测试组的路由 12 | option (http.Route) = "test"; 13 | 14 | // 获取首页信息 15 | // 更加复杂的描述内容,123432 16 | // 更加复杂的描述内容,123432fdsafd 17 | // 更加复杂的描述内容,fdsaf 18 | // 更加复杂的描述内容,1234fd32 19 | // f 20 | rpc Index(HomeRequest)returns(HomeResponse){ 21 | option (http.Get) = "/"; 22 | } 23 | 24 | // 获取首页信息 25 | rpc Index2(HomeRequest)returns(HomeResponse){ 26 | option (http.Post) = "/index"; 27 | } 28 | 29 | // 忽略浏览器的空请求 30 | rpc Favicon(HomeRequest)returns(Null){ 31 | option (http.Get) = "/favicon.ico"; 32 | } 33 | 34 | // Oss授权 35 | // 发动机撒浪费;觉得你撒;附近的撒浪费几点上课啦;附近收到啦; 36 | rpc Oss(OssRequest)returns(OssResponse){ 37 | option (http.Get) = "/oss/sts"; 38 | } 39 | } 40 | 41 | message HomeRequest { 42 | // 用户id 43 | int32 user_id = 3; 44 | bool boolean = 4; 45 | bytes str = 5; 46 | } 47 | 48 | message HomeResponse { 49 | string version = 1; 50 | int64 time = 2; 51 | } 52 | 53 | message OssRequest { 54 | string token = 1; 55 | } 56 | 57 | message OssResponse { 58 | int64 StatusCode = 1; 59 | string AccessKeyId = 2; 60 | string AccessKeySecret = 3; 61 | string SecurityToken = 4; 62 | string Expiration = 5; 63 | } 64 | 65 | message Null { 66 | 67 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Exception/CommandNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Exception; 13 | 14 | /** 15 | * Represents an incorrect command name typed in the console. 16 | * 17 | * @author Jérôme Tamarelle 18 | */ 19 | class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface 20 | { 21 | private $alternatives; 22 | 23 | /** 24 | * @param string $message Exception message to throw 25 | * @param string[] $alternatives List of similar defined names 26 | * @param int $code Exception code 27 | * @param \Throwable|null $previous Previous exception used for the exception chaining 28 | */ 29 | public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) 30 | { 31 | parent::__construct($message, $code, $previous); 32 | 33 | $this->alternatives = $alternatives; 34 | } 35 | 36 | /** 37 | * @return string[] A list of similar defined names 38 | */ 39 | public function getAlternatives() 40 | { 41 | return $this->alternatives; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/symfony/console/Event/ConsoleCommandEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | /** 15 | * Allows to do things before the command is executed, like skipping the command or changing the input. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | final class ConsoleCommandEvent extends ConsoleEvent 20 | { 21 | /** 22 | * The return code for skipped commands, this will also be passed into the terminate event. 23 | */ 24 | public const RETURN_CODE_DISABLED = 113; 25 | 26 | /** 27 | * Indicates if the command should be run or skipped. 28 | */ 29 | private $commandShouldRun = true; 30 | 31 | /** 32 | * Disables the command, so it won't be run. 33 | */ 34 | public function disableCommand(): bool 35 | { 36 | return $this->commandShouldRun = false; 37 | } 38 | 39 | public function enableCommand(): bool 40 | { 41 | return $this->commandShouldRun = true; 42 | } 43 | 44 | /** 45 | * Returns true if the command is runnable, false otherwise. 46 | */ 47 | public function commandShouldRun(): bool 48 | { 49 | return $this->commandShouldRun; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/symfony/string/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/string", 3 | "type": "library", 4 | "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", 5 | "keywords": ["string", "utf8", "utf-8", "grapheme", "i18n", "unicode"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Nicolas Grekas", 11 | "email": "p@tchwork.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.2.5", 20 | "symfony/polyfill-ctype": "~1.8", 21 | "symfony/polyfill-intl-grapheme": "~1.0", 22 | "symfony/polyfill-intl-normalizer": "~1.0", 23 | "symfony/polyfill-mbstring": "~1.0", 24 | "symfony/polyfill-php80": "~1.15" 25 | }, 26 | "require-dev": { 27 | "symfony/error-handler": "^4.4|^5.0", 28 | "symfony/http-client": "^4.4|^5.0", 29 | "symfony/translation-contracts": "^1.1|^2", 30 | "symfony/var-exporter": "^4.4|^5.0" 31 | }, 32 | "autoload": { 33 | "psr-4": { "Symfony\\Component\\String\\": "" }, 34 | "files": [ "Resources/functions.php" ], 35 | "exclude-from-classmap": [ 36 | "/Tests/" 37 | ] 38 | }, 39 | "minimum-stability": "dev" 40 | } 41 | -------------------------------------------------------------------------------- /vendor/symfony/console/Formatter/NullOutputFormatterStyle.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | namespace Symfony\Component\Console\Formatter; 12 | 13 | /** 14 | * @author Tien Xuan Vo 15 | */ 16 | final class NullOutputFormatterStyle implements OutputFormatterStyleInterface 17 | { 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function apply(string $text): string 22 | { 23 | return $text; 24 | } 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function setBackground(string $color = null): void 30 | { 31 | // do nothing 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | public function setForeground(string $color = null): void 38 | { 39 | // do nothing 40 | } 41 | 42 | /** 43 | * {@inheritdoc} 44 | */ 45 | public function setOption(string $option): void 46 | { 47 | // do nothing 48 | } 49 | 50 | /** 51 | * {@inheritdoc} 52 | */ 53 | public function setOptions(array $options): void 54 | { 55 | // do nothing 56 | } 57 | 58 | /** 59 | * {@inheritdoc} 60 | */ 61 | public function unsetOption(string $option): void 62 | { 63 | // do nothing 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /golang-parser/src/FileParser/Parameter.php: -------------------------------------------------------------------------------- 1 | name; 22 | } 23 | 24 | /** 25 | * @param string $name 26 | */ 27 | public function setName(string $name): void 28 | { 29 | $this->name = $name; 30 | } 31 | 32 | /** 33 | * @return string 34 | */ 35 | public function getType(): string 36 | { 37 | return $this->type; 38 | } 39 | 40 | /** 41 | * @param string $type 42 | */ 43 | public function setType(string $type): void 44 | { 45 | $this->type = $type; 46 | } 47 | 48 | /** 49 | * @return bool 50 | */ 51 | public function isPointer(): bool 52 | { 53 | return $this->isPointer; 54 | } 55 | 56 | /** 57 | * @param bool $isPointer 58 | */ 59 | public function setIsPointer(bool $isPointer): void 60 | { 61 | $this->isPointer = $isPointer; 62 | } 63 | 64 | /** 65 | * @return bool 66 | */ 67 | public function isNotArray(): bool 68 | { 69 | return $this->notArray; 70 | } 71 | 72 | /** 73 | * @param bool $notArray 74 | */ 75 | public function setNotArray(bool $notArray): void 76 | { 77 | $this->notArray = $notArray; 78 | } 79 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Formatter/OutputFormatterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter interface for console output. 16 | * 17 | * @author Konstantin Kudryashov 18 | */ 19 | interface OutputFormatterInterface 20 | { 21 | /** 22 | * Sets the decorated flag. 23 | */ 24 | public function setDecorated(bool $decorated); 25 | 26 | /** 27 | * Gets the decorated flag. 28 | * 29 | * @return bool true if the output will decorate messages, false otherwise 30 | */ 31 | public function isDecorated(); 32 | 33 | /** 34 | * Sets a new style. 35 | */ 36 | public function setStyle(string $name, OutputFormatterStyleInterface $style); 37 | 38 | /** 39 | * Checks if output formatter has style with specified name. 40 | * 41 | * @return bool 42 | */ 43 | public function hasStyle(string $name); 44 | 45 | /** 46 | * Gets style options from style with specified name. 47 | * 48 | * @return OutputFormatterStyleInterface 49 | * 50 | * @throws \InvalidArgumentException When style isn't defined 51 | */ 52 | public function getStyle(string $name); 53 | 54 | /** 55 | * Formats a message according to the given styles. 56 | */ 57 | public function format(?string $message); 58 | } 59 | -------------------------------------------------------------------------------- /vendor/symfony/console/CommandLoader/FactoryCommandLoader.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\CommandLoader; 13 | 14 | use Symfony\Component\Console\Exception\CommandNotFoundException; 15 | 16 | /** 17 | * A simple command loader using factories to instantiate commands lazily. 18 | * 19 | * @author Maxime Steinhausser 20 | */ 21 | class FactoryCommandLoader implements CommandLoaderInterface 22 | { 23 | private $factories; 24 | 25 | /** 26 | * @param callable[] $factories Indexed by command names 27 | */ 28 | public function __construct(array $factories) 29 | { 30 | $this->factories = $factories; 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function has(string $name) 37 | { 38 | return isset($this->factories[$name]); 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function get(string $name) 45 | { 46 | if (!isset($this->factories[$name])) { 47 | throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); 48 | } 49 | 50 | $factory = $this->factories[$name]; 51 | 52 | return $factory(); 53 | } 54 | 55 | /** 56 | * {@inheritdoc} 57 | */ 58 | public function getNames() 59 | { 60 | return array_keys($this->factories); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/CurdHelp/template/proto: -------------------------------------------------------------------------------- 1 | // @Tag("form") 2 | syntax = "proto3"; 3 | 4 | package {model}; 5 | 6 | import "http_config.proto"; 7 | 8 | option go_package = "{gomodule}/generate/proto/{app}/{model}"; 9 | 10 | // {controller_doc}资源控制器 11 | service {controller_name} { 12 | // 需要登陆 13 | option (http.RouteGroup) = "login"; 14 | 15 | // {controller_doc}列表 16 | rpc Get({controller_name}GetRequest) returns ({controller_name}GetResponse){ 17 | option (http.Get) = "/{model}/{table_name}"; 18 | } 19 | // {controller_doc}创建 20 | rpc Post({controller_name}PostRequest) returns ({controller_name}PostResponse){ 21 | option (http.Post) = "/{model}/{table_name}"; 22 | } 23 | // {controller_doc}更新 24 | rpc Put({controller_name}PutRequest) returns ({controller_name}PutResponse){ 25 | option (http.Put) = "/{model}/{table_name}/:id"; 26 | } 27 | // {controller_doc}删除 28 | rpc Del({controller_name}PutRequest) returns ({controller_name}PutResponse){ 29 | option (http.Delete) = "/{model}/{table_name}/:id"; 30 | } 31 | } 32 | 33 | message {controller_name}GetRequest { 34 | // 列表第几页, 默认1 35 | uint32 page = 1; 36 | // 每页多少条数据 37 | uint32 limit = 2; 38 | } 39 | 40 | message {controller_name}GetResponse { 41 | // 数据列表 42 | repeated {table_info_name} list = 1; 43 | // 符合条件总数量, 计算多少页 44 | uint32 total = 2; 45 | } 46 | 47 | message {controller_name}PostRequest { 48 | {proto_str} 49 | } 50 | message {controller_name}PostResponse { 51 | // 提示语 52 | string tip = 1; 53 | } 54 | 55 | message {controller_name}PutRequest { 56 | {proto_str} 57 | } 58 | message {controller_name}PutResponse { 59 | // 提示语 60 | string tip = 1; 61 | } 62 | 63 | message {table_info_name} { 64 | {proto_str} 65 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # home-toolset-php 2 | 使用php编写的go编译工具 3 | 4 | 为什么是php而不是go, 快速验证思路, 想在写伪代码无法运行时也能正常生成依赖提示; 5 | 6 | 而不是正常编写完整程序, 能正常启动程序后才使用反射去生成; 7 | 8 | # 依赖工具 9 | ~~~~shell 10 | php toolset make:bean ./../home-admin 11 | ~~~~ 12 | 检查目录`./../home-admin`下的所有文件, 符合以下代码的注释`@Bean`和`inject:""`生成自动依赖的文件`z_inject_gen.go` 13 | ~~~~go 14 | // @Bean 15 | type kernel struct { 16 | httpServer *services.HttpServer `inject:""` 17 | } 18 | // New{YourStruct}Provider() 函数被定制的话, 不会在z_inject_gen.go重复生成 19 | // New{YourStruct}Provider() 服务提供函数, 如果有业务可以自己编写, 不依赖工具 20 | ~~~~ 21 | `z_inject_gen.go`内容 22 | ~~~~go 23 | // 代码由home-admin生成, 不需要编辑它 24 | 25 | package http 26 | 27 | import ( 28 | services "github.com/cyz-home/home-admin/bootstrap/services" 29 | ) 30 | 31 | var kernelSingle *kernel 32 | 33 | func NewkernelProvider(httpServer *services.HttpServer) *kernel { 34 | kernel := &kernel{} 35 | kernel.httpServer = httpServer 36 | return kernel 37 | } 38 | 39 | func InitializeNewkernelProvider() *kernel { 40 | if kernelSingle == nil { 41 | kernelSingle = NewkernelProvider( 42 | services.InitializeNewHttpServerProvider(), 43 | ) 44 | } 45 | 46 | return kernelSingle 47 | } 48 | ~~~~ 49 | 50 | `NewkernelProvider` 如无必要应该只有 `InitializeNewkernelProvider` 调用。 51 | 而`InitializeNewkernelProvider`才是其他业务或者测试逻辑初始函数, 当然作为一个整体系统开发来说, 52 | `InitializeNewkernelProvider` 也是由框架层的引导程序初始化, 一般也很少调用, 单元测试用的多。 53 | 54 | # proto自定义标签 55 | ~~~~ 56 | // proto文件顶部注释, 全部struct标签后都统一加上bson标签 57 | // @Tag("bson") 和 @Tag("bson", "{name}") 等价 58 | 59 | // 属性标签 60 | message ApiDemoHomeRequest { 61 | // @Tag("gorm", "primaryKey") 62 | int64 id = 1; 63 | } 64 | ~~~~ 65 | 66 | # 系统地使用 67 | 68 | 写一个能够半低代码是go框架 69 | https://{gomodule} 70 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Php80 as p; 13 | 14 | if (\PHP_VERSION_ID >= 80000) { 15 | return; 16 | } 17 | 18 | if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { 19 | define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); 20 | } 21 | 22 | if (!function_exists('fdiv')) { 23 | function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } 24 | } 25 | if (!function_exists('preg_last_error_msg')) { 26 | function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } 27 | } 28 | if (!function_exists('str_contains')) { 29 | function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } 30 | } 31 | if (!function_exists('str_starts_with')) { 32 | function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } 33 | } 34 | if (!function_exists('str_ends_with')) { 35 | function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } 36 | } 37 | if (!function_exists('get_debug_type')) { 38 | function get_debug_type($value): string { return p\Php80::get_debug_type($value); } 39 | } 40 | if (!function_exists('get_resource_id')) { 41 | function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/Swagger/Tag.php: -------------------------------------------------------------------------------- 1 | name; 19 | } 20 | 21 | /** 22 | * @param string $name 23 | */ 24 | public function setName(string $name): void 25 | { 26 | $this->name = $name; 27 | } 28 | 29 | /** 30 | * @return string 31 | */ 32 | public function getDescription(): string 33 | { 34 | return $this->description; 35 | } 36 | 37 | /** 38 | * @param mixed $description 39 | */ 40 | public function setDescription(string $description): void 41 | { 42 | $this->description = $description; 43 | } 44 | 45 | /** 46 | * @return array 47 | */ 48 | public function getExternalDocs(): array 49 | { 50 | return $this->externalDocs; 51 | } 52 | 53 | /** 54 | * [ 55 | * "description": "Find out more", 56 | * "url": "http://swagger.io" 57 | * ] 58 | * @param mixed $externalDocs 59 | */ 60 | public function setExternalDocs(array $externalDocs): void 61 | { 62 | $this->externalDocs = $externalDocs; 63 | } 64 | 65 | public function toArray(): array 66 | { 67 | $got = [ 68 | "name" => $this->name, 69 | "description" => $this->description, 70 | ]; 71 | if ($this->externalDocs){ 72 | $got["externalDocs"] = $this->externalDocs; 73 | } 74 | return $got; 75 | } 76 | } -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/Swagger/Response.php: -------------------------------------------------------------------------------- 1 | code; 26 | } 27 | 28 | /** 29 | * @param int $code 30 | */ 31 | public function setCode(int $code): void 32 | { 33 | $this->code = $code; 34 | } 35 | 36 | /** 37 | * @return mixed 38 | */ 39 | public function getDescription() 40 | { 41 | return $this->description; 42 | } 43 | 44 | /** 45 | * @param mixed $description 46 | */ 47 | public function setDescription($description): void 48 | { 49 | $this->description = $description; 50 | } 51 | 52 | /** 53 | * @return array 54 | */ 55 | public function getSchema(): array 56 | { 57 | return $this->schema; 58 | } 59 | 60 | /** 61 | * @param array $schema 62 | */ 63 | public function setSchema(array $schema): void 64 | { 65 | $this->schema = $schema; 66 | } 67 | 68 | public function toArray() 69 | { 70 | $got = [ 71 | "description" => $this->description, 72 | "schema" => $this->schema, 73 | ]; 74 | foreach ($got as $i => $value) { 75 | if ($value === null) { 76 | unset($got[$i]); 77 | } 78 | } 79 | return $got; 80 | } 81 | } -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-grapheme/README.md: -------------------------------------------------------------------------------- 1 | Symfony Polyfill / Intl: Grapheme 2 | ================================= 3 | 4 | This component provides a partial, native PHP implementation of the 5 | [Grapheme functions](https://php.net/intl.grapheme) from the 6 | [Intl](https://php.net/intl) extension. 7 | 8 | - [`grapheme_extract`](https://php.net/grapheme_extract): Extract a sequence of grapheme 9 | clusters from a text buffer, which must be encoded in UTF-8 10 | - [`grapheme_stripos`](https://php.net/grapheme_stripos): Find position (in grapheme units) 11 | of first occurrence of a case-insensitive string 12 | - [`grapheme_stristr`](https://php.net/grapheme_stristr): Returns part of haystack string 13 | from the first occurrence of case-insensitive needle to the end of haystack 14 | - [`grapheme_strlen`](https://php.net/grapheme_strlen): Get string length in grapheme units 15 | - [`grapheme_strpos`](https://php.net/grapheme_strpos): Find position (in grapheme units) 16 | of first occurrence of a string 17 | - [`grapheme_strripos`](https://php.net/grapheme_strripos): Find position (in grapheme units) 18 | of last occurrence of a case-insensitive string 19 | - [`grapheme_strrpos`](https://php.net/grapheme_strrpos): Find position (in grapheme units) 20 | of last occurrence of a string 21 | - [`grapheme_strstr`](https://php.net/grapheme_strstr): Returns part of haystack string from 22 | the first occurrence of needle to the end of haystack 23 | - [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string 24 | 25 | More information can be found in the 26 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). 27 | 28 | License 29 | ======= 30 | 31 | This library is released under the [MIT license](LICENSE). 32 | -------------------------------------------------------------------------------- /vendor/symfony/console/Event/ConsoleErrorEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * Allows to handle throwables thrown while running a command. 20 | * 21 | * @author Wouter de Jong 22 | */ 23 | final class ConsoleErrorEvent extends ConsoleEvent 24 | { 25 | private $error; 26 | private $exitCode; 27 | 28 | public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null) 29 | { 30 | parent::__construct($command, $input, $output); 31 | 32 | $this->error = $error; 33 | } 34 | 35 | public function getError(): \Throwable 36 | { 37 | return $this->error; 38 | } 39 | 40 | public function setError(\Throwable $error): void 41 | { 42 | $this->error = $error; 43 | } 44 | 45 | public function setExitCode(int $exitCode): void 46 | { 47 | $this->exitCode = $exitCode; 48 | 49 | $r = new \ReflectionProperty($this->error, 'code'); 50 | $r->setAccessible(true); 51 | $r->setValue($this->error, $this->exitCode); 52 | } 53 | 54 | public function getExitCode(): int 55 | { 56 | return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/symfony/console/Formatter/NullOutputFormatter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * @author Tien Xuan Vo 16 | */ 17 | final class NullOutputFormatter implements OutputFormatterInterface 18 | { 19 | private $style; 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function format(?string $message): void 25 | { 26 | // do nothing 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getStyle(string $name): OutputFormatterStyleInterface 33 | { 34 | if ($this->style) { 35 | return $this->style; 36 | } 37 | // to comply with the interface we must return a OutputFormatterStyleInterface 38 | return $this->style = new NullOutputFormatterStyle(); 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function hasStyle(string $name): bool 45 | { 46 | return false; 47 | } 48 | 49 | /** 50 | * {@inheritdoc} 51 | */ 52 | public function isDecorated(): bool 53 | { 54 | return false; 55 | } 56 | 57 | /** 58 | * {@inheritdoc} 59 | */ 60 | public function setDecorated(bool $decorated): void 61 | { 62 | // do nothing 63 | } 64 | 65 | /** 66 | * {@inheritdoc} 67 | */ 68 | public function setStyle(string $name, OutputFormatterStyleInterface $style): void 69 | { 70 | // do nothing 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /vendor/symfony/console/Event/ConsoleEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | use Symfony\Contracts\EventDispatcher\Event; 18 | 19 | /** 20 | * Allows to inspect input and output of a command. 21 | * 22 | * @author Francesco Levorato 23 | */ 24 | class ConsoleEvent extends Event 25 | { 26 | protected $command; 27 | 28 | private $input; 29 | private $output; 30 | 31 | public function __construct(?Command $command, InputInterface $input, OutputInterface $output) 32 | { 33 | $this->command = $command; 34 | $this->input = $input; 35 | $this->output = $output; 36 | } 37 | 38 | /** 39 | * Gets the command that is executed. 40 | * 41 | * @return Command|null A Command instance 42 | */ 43 | public function getCommand() 44 | { 45 | return $this->command; 46 | } 47 | 48 | /** 49 | * Gets the input instance. 50 | * 51 | * @return InputInterface An InputInterface instance 52 | */ 53 | public function getInput() 54 | { 55 | return $this->input; 56 | } 57 | 58 | /** 59 | * Gets the output instance. 60 | * 61 | * @return OutputInterface An OutputInterface instance 62 | */ 63 | public function getOutput() 64 | { 65 | return $this->output; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/symfony/console/CommandLoader/ContainerCommandLoader.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\CommandLoader; 13 | 14 | use Psr\Container\ContainerInterface; 15 | use Symfony\Component\Console\Exception\CommandNotFoundException; 16 | 17 | /** 18 | * Loads commands from a PSR-11 container. 19 | * 20 | * @author Robin Chalas 21 | */ 22 | class ContainerCommandLoader implements CommandLoaderInterface 23 | { 24 | private $container; 25 | private $commandMap; 26 | 27 | /** 28 | * @param array $commandMap An array with command names as keys and service ids as values 29 | */ 30 | public function __construct(ContainerInterface $container, array $commandMap) 31 | { 32 | $this->container = $container; 33 | $this->commandMap = $commandMap; 34 | } 35 | 36 | /** 37 | * {@inheritdoc} 38 | */ 39 | public function get(string $name) 40 | { 41 | if (!$this->has($name)) { 42 | throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); 43 | } 44 | 45 | return $this->container->get($this->commandMap[$name]); 46 | } 47 | 48 | /** 49 | * {@inheritdoc} 50 | */ 51 | public function has(string $name) 52 | { 53 | return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); 54 | } 55 | 56 | /** 57 | * {@inheritdoc} 58 | */ 59 | public function getNames() 60 | { 61 | return array_keys($this->commandMap); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Ctype as p; 13 | 14 | if (\PHP_VERSION_ID >= 80000) { 15 | return require __DIR__.'/bootstrap80.php'; 16 | } 17 | 18 | if (!function_exists('ctype_alnum')) { 19 | function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } 20 | } 21 | if (!function_exists('ctype_alpha')) { 22 | function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } 23 | } 24 | if (!function_exists('ctype_cntrl')) { 25 | function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } 26 | } 27 | if (!function_exists('ctype_digit')) { 28 | function ctype_digit($text) { return p\Ctype::ctype_digit($text); } 29 | } 30 | if (!function_exists('ctype_graph')) { 31 | function ctype_graph($text) { return p\Ctype::ctype_graph($text); } 32 | } 33 | if (!function_exists('ctype_lower')) { 34 | function ctype_lower($text) { return p\Ctype::ctype_lower($text); } 35 | } 36 | if (!function_exists('ctype_print')) { 37 | function ctype_print($text) { return p\Ctype::ctype_print($text); } 38 | } 39 | if (!function_exists('ctype_punct')) { 40 | function ctype_punct($text) { return p\Ctype::ctype_punct($text); } 41 | } 42 | if (!function_exists('ctype_space')) { 43 | function ctype_space($text) { return p\Ctype::ctype_space($text); } 44 | } 45 | if (!function_exists('ctype_upper')) { 46 | function ctype_upper($text) { return p\Ctype::ctype_upper($text); } 47 | } 48 | if (!function_exists('ctype_xdigit')) { 49 | function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/symfony/console/Question/ConfirmationQuestion.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Question; 13 | 14 | /** 15 | * Represents a yes/no question. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class ConfirmationQuestion extends Question 20 | { 21 | private $trueAnswerRegex; 22 | 23 | /** 24 | * @param string $question The question to ask to the user 25 | * @param bool $default The default answer to return, true or false 26 | * @param string $trueAnswerRegex A regex to match the "yes" answer 27 | */ 28 | public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') 29 | { 30 | parent::__construct($question, $default); 31 | 32 | $this->trueAnswerRegex = $trueAnswerRegex; 33 | $this->setNormalizer($this->getDefaultNormalizer()); 34 | } 35 | 36 | /** 37 | * Returns the default answer normalizer. 38 | */ 39 | private function getDefaultNormalizer(): callable 40 | { 41 | $default = $this->getDefault(); 42 | $regex = $this->trueAnswerRegex; 43 | 44 | return function ($answer) use ($default, $regex) { 45 | if (\is_bool($answer)) { 46 | return $answer; 47 | } 48 | 49 | $answerIsTrue = (bool) preg_match($regex, $answer); 50 | if (false === $default) { 51 | return $answer && $answerIsTrue; 52 | } 53 | 54 | return '' === $answer || $answerIsTrue; 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/bootstrap80.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Ctype as p; 13 | 14 | if (!function_exists('ctype_alnum')) { 15 | function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } 16 | } 17 | if (!function_exists('ctype_alpha')) { 18 | function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } 19 | } 20 | if (!function_exists('ctype_cntrl')) { 21 | function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } 22 | } 23 | if (!function_exists('ctype_digit')) { 24 | function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } 25 | } 26 | if (!function_exists('ctype_graph')) { 27 | function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } 28 | } 29 | if (!function_exists('ctype_lower')) { 30 | function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } 31 | } 32 | if (!function_exists('ctype_print')) { 33 | function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } 34 | } 35 | if (!function_exists('ctype_punct')) { 36 | function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } 37 | } 38 | if (!function_exists('ctype_space')) { 39 | function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } 40 | } 41 | if (!function_exists('ctype_upper')) { 42 | function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } 43 | } 44 | if (!function_exists('ctype_xdigit')) { 45 | function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } 46 | } 47 | -------------------------------------------------------------------------------- /vendor/symfony/console/Output/TrimmedBufferOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | use Symfony\Component\Console\Exception\InvalidArgumentException; 15 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; 16 | 17 | /** 18 | * A BufferedOutput that keeps only the last N chars. 19 | * 20 | * @author Jérémy Derussé 21 | */ 22 | class TrimmedBufferOutput extends Output 23 | { 24 | private $maxLength; 25 | private $buffer = ''; 26 | 27 | public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) { 28 | if ($maxLength <= 0) { 29 | throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength)); 30 | } 31 | 32 | parent::__construct($verbosity, $decorated, $formatter); 33 | $this->maxLength = $maxLength; 34 | } 35 | 36 | /** 37 | * Empties buffer and returns its content. 38 | * 39 | * @return string 40 | */ 41 | public function fetch() 42 | { 43 | $content = $this->buffer; 44 | $this->buffer = ''; 45 | 46 | return $content; 47 | } 48 | 49 | /** 50 | * {@inheritdoc} 51 | */ 52 | protected function doWrite(string $message, bool $newline) 53 | { 54 | $this->buffer .= $message; 55 | 56 | if ($newline) { 57 | $this->buffer .= \PHP_EOL; 58 | } 59 | 60 | $this->buffer = substr($this->buffer, 0 - $this->maxLength); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/symfony/console/SignalRegistry/SignalRegistry.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\SignalRegistry; 13 | 14 | final class SignalRegistry 15 | { 16 | private $signalHandlers = []; 17 | 18 | public function __construct() 19 | { 20 | if (\function_exists('pcntl_async_signals')) { 21 | pcntl_async_signals(true); 22 | } 23 | } 24 | 25 | public function register(int $signal, callable $signalHandler): void 26 | { 27 | if (!isset($this->signalHandlers[$signal])) { 28 | $previousCallback = pcntl_signal_get_handler($signal); 29 | 30 | if (\is_callable($previousCallback)) { 31 | $this->signalHandlers[$signal][] = $previousCallback; 32 | } 33 | } 34 | 35 | $this->signalHandlers[$signal][] = $signalHandler; 36 | 37 | pcntl_signal($signal, [$this, 'handle']); 38 | } 39 | 40 | public static function isSupported(): bool 41 | { 42 | if (!\function_exists('pcntl_signal')) { 43 | return false; 44 | } 45 | 46 | if (\in_array('pcntl_signal', explode(',', ini_get('disable_functions')))) { 47 | return false; 48 | } 49 | 50 | return true; 51 | } 52 | 53 | /** 54 | * @internal 55 | */ 56 | public function handle(int $signal): void 57 | { 58 | $count = \count($this->signalHandlers[$signal]); 59 | 60 | foreach ($this->signalHandlers[$signal] as $i => $signalHandler) { 61 | $hasNext = $i !== $count - 1; 62 | $signalHandler($signal, $hasNext); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/Service/Rpc.php: -------------------------------------------------------------------------------- 1 | doc, "//"); 21 | } 22 | 23 | /** 24 | * @param mixed $doc 25 | */ 26 | public function setDoc($doc): void 27 | { 28 | $this->doc = $doc; 29 | } 30 | 31 | /** 32 | * @return mixed 33 | */ 34 | public function getName() 35 | { 36 | return $this->name; 37 | } 38 | 39 | /** 40 | * @param mixed $name 41 | */ 42 | public function setName($name): void 43 | { 44 | $this->name = $name; 45 | } 46 | 47 | /** 48 | * @return mixed 49 | */ 50 | public function getParameter() 51 | { 52 | return $this->parameter; 53 | } 54 | 55 | /** 56 | * @param mixed $parameter 57 | */ 58 | public function setParameter($parameter): void 59 | { 60 | $this->parameter = $parameter; 61 | } 62 | 63 | /** 64 | * @return mixed 65 | */ 66 | public function getResponse() 67 | { 68 | return $this->response; 69 | } 70 | 71 | /** 72 | * @param mixed $response 73 | */ 74 | public function setResponse($response): void 75 | { 76 | $this->response = $response; 77 | } 78 | 79 | /** 80 | * @return array 81 | */ 82 | public function getOptions(): array 83 | { 84 | return $this->options; 85 | } 86 | 87 | /** 88 | * @param array $options 89 | */ 90 | public function setOptions(array $options): void 91 | { 92 | $this->options = $options; 93 | } 94 | } -------------------------------------------------------------------------------- /golang-parser/src/FileParser.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | use Symfony\Component\Console\Exception\LogicException; 15 | use Symfony\Component\Lock\Lock; 16 | use Symfony\Component\Lock\LockFactory; 17 | use Symfony\Component\Lock\Store\FlockStore; 18 | use Symfony\Component\Lock\Store\SemaphoreStore; 19 | 20 | /** 21 | * Basic lock feature for commands. 22 | * 23 | * @author Geoffrey Brier 24 | */ 25 | trait LockableTrait 26 | { 27 | /** @var Lock */ 28 | private $lock; 29 | 30 | /** 31 | * Locks a command. 32 | */ 33 | private function lock(string $name = null, bool $blocking = false): bool 34 | { 35 | if (!class_exists(SemaphoreStore::class)) { 36 | throw new LogicException('To enable the locking feature you must install the symfony/lock component.'); 37 | } 38 | 39 | if (null !== $this->lock) { 40 | throw new LogicException('A lock is already in place.'); 41 | } 42 | 43 | if (SemaphoreStore::isSupported()) { 44 | $store = new SemaphoreStore(); 45 | } else { 46 | $store = new FlockStore(); 47 | } 48 | 49 | $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName()); 50 | if (!$this->lock->acquire($blocking)) { 51 | $this->lock = null; 52 | 53 | return false; 54 | } 55 | 56 | return true; 57 | } 58 | 59 | /** 60 | * Releases the command lock if there is one. 61 | */ 62 | private function release() 63 | { 64 | if ($this->lock) { 65 | $this->lock->release(); 66 | $this->lock = null; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /vendor/symfony/console/SingleCommandApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * @author Grégoire Pineau 20 | */ 21 | class SingleCommandApplication extends Command 22 | { 23 | private $version = 'UNKNOWN'; 24 | private $autoExit = true; 25 | private $running = false; 26 | 27 | public function setVersion(string $version): self 28 | { 29 | $this->version = $version; 30 | 31 | return $this; 32 | } 33 | 34 | /** 35 | * @final 36 | */ 37 | public function setAutoExit(bool $autoExit): self 38 | { 39 | $this->autoExit = $autoExit; 40 | 41 | return $this; 42 | } 43 | 44 | public function run(InputInterface $input = null, OutputInterface $output = null): int 45 | { 46 | if ($this->running) { 47 | return parent::run($input, $output); 48 | } 49 | 50 | // We use the command name as the application name 51 | $application = new Application($this->getName() ?: 'UNKNOWN', $this->version); 52 | $application->setAutoExit($this->autoExit); 53 | // Fix the usage of the command displayed with "--help" 54 | $this->setName($_SERVER['argv'][0]); 55 | $application->add($this); 56 | $application->setDefaultCommand($this->getName(), true); 57 | 58 | $this->running = true; 59 | try { 60 | $ret = $application->run($input, $output); 61 | } finally { 62 | $this->running = false; 63 | } 64 | 65 | return $ret ?? 1; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/symfony/console/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/console", 3 | "type": "library", 4 | "description": "Eases the creation of beautiful and testable command line interfaces", 5 | "keywords": ["console", "cli", "command line", "terminal"], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=7.2.5", 20 | "symfony/deprecation-contracts": "^2.1", 21 | "symfony/polyfill-mbstring": "~1.0", 22 | "symfony/polyfill-php73": "^1.8", 23 | "symfony/polyfill-php80": "^1.16", 24 | "symfony/service-contracts": "^1.1|^2", 25 | "symfony/string": "^5.1" 26 | }, 27 | "require-dev": { 28 | "symfony/config": "^4.4|^5.0", 29 | "symfony/event-dispatcher": "^4.4|^5.0", 30 | "symfony/dependency-injection": "^4.4|^5.0", 31 | "symfony/lock": "^4.4|^5.0", 32 | "symfony/process": "^4.4|^5.0", 33 | "symfony/var-dumper": "^4.4|^5.0", 34 | "psr/log": "^1|^2" 35 | }, 36 | "provide": { 37 | "psr/log-implementation": "1.0|2.0" 38 | }, 39 | "suggest": { 40 | "symfony/event-dispatcher": "", 41 | "symfony/lock": "", 42 | "symfony/process": "", 43 | "psr/log": "For using the console logger" 44 | }, 45 | "conflict": { 46 | "psr/log": ">=3", 47 | "symfony/dependency-injection": "<4.4", 48 | "symfony/dotenv": "<5.1", 49 | "symfony/event-dispatcher": "<4.4", 50 | "symfony/lock": "<4.4", 51 | "symfony/process": "<4.4" 52 | }, 53 | "autoload": { 54 | "psr-4": { "Symfony\\Component\\Console\\": "" }, 55 | "exclude-from-classmap": [ 56 | "/Tests/" 57 | ] 58 | }, 59 | "minimum-stability": "dev" 60 | } 61 | -------------------------------------------------------------------------------- /vendor/symfony/console/Tester/ApplicationTester.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tester; 13 | 14 | use Symfony\Component\Console\Application; 15 | use Symfony\Component\Console\Input\ArrayInput; 16 | 17 | /** 18 | * Eases the testing of console applications. 19 | * 20 | * When testing an application, don't forget to disable the auto exit flag: 21 | * 22 | * $application = new Application(); 23 | * $application->setAutoExit(false); 24 | * 25 | * @author Fabien Potencier 26 | */ 27 | class ApplicationTester 28 | { 29 | use TesterTrait; 30 | 31 | private $application; 32 | private $input; 33 | private $statusCode; 34 | 35 | public function __construct(Application $application) 36 | { 37 | $this->application = $application; 38 | } 39 | 40 | /** 41 | * Executes the application. 42 | * 43 | * Available options: 44 | * 45 | * * interactive: Sets the input interactive flag 46 | * * decorated: Sets the output decorated flag 47 | * * verbosity: Sets the output verbosity flag 48 | * * capture_stderr_separately: Make output of stdOut and stdErr separately available 49 | * 50 | * @return int The command exit code 51 | */ 52 | public function run(array $input, array $options = []) 53 | { 54 | $this->input = new ArrayInput($input); 55 | if (isset($options['interactive'])) { 56 | $this->input->setInteractive($options['interactive']); 57 | } 58 | 59 | if ($this->inputs) { 60 | $this->input->setStream(self::createStream($this->inputs)); 61 | } 62 | 63 | $this->initOutput($options); 64 | 65 | return $this->statusCode = $this->application->run($this->input, $this->output); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /golang-parser/src/ArrayToFileInfo.php: -------------------------------------------------------------------------------- 1 | getArray(); 22 | 23 | for ($offset = 0; $offset < count($array); $offset++) { 24 | $str = $array[$offset]; 25 | switch ($str) { 26 | case "package": 27 | $fileInfo["package"][] = new Package($array, $offset, $doc, $goArray); 28 | $doc = ''; 29 | break; 30 | case "import": 31 | $fileInfo["import"][] = new Import($array, $offset, $doc, $goArray); 32 | $doc = ''; 33 | break; 34 | case "type": 35 | $fileInfo["type"][] = new Type($array, $offset, $doc, $goArray); 36 | $doc = ''; 37 | break; 38 | case "func": 39 | $fileInfo["func"][] = new Func($array, $offset, $doc, $goArray); 40 | $doc = ''; 41 | break; 42 | case "const": 43 | $fileInfo["const"][] = new GoConst($array, $offset, $doc, $goArray); 44 | $doc = ''; 45 | break; 46 | case "var": 47 | $fileInfo["var"][] = new GoVar($array, $offset, $doc, $goArray); 48 | $doc = ''; 49 | break; 50 | default: 51 | if ( substr($str,0,2)=="//" ) { 52 | $doc .= $str; 53 | } 54 | break; 55 | } 56 | } 57 | return $fileInfo; 58 | } 59 | } -------------------------------------------------------------------------------- /golang-parser/src/FileParser/Import.php: -------------------------------------------------------------------------------- 1 | parser($array, $offset); 22 | } else { 23 | $offset = $temp; 24 | $code = implode("", $arr); 25 | $code = trim($code); 26 | $code = trim($code, "import"); 27 | $code = trim($code); 28 | $this->parserCode($code); 29 | } 30 | } 31 | 32 | public function parser(array $array, int &$offset) 33 | { 34 | $arr = StringHelp::onStopWithSymmetricStr($array, $offset, "(", ")"); 35 | $code = implode("", $arr); 36 | $code = StringHelp::cutStr("(", ")", $code); 37 | $arr = explode(PHP_EOL, $code); 38 | 39 | foreach ($arr as $str) { 40 | $str = trim($str); 41 | if (!$str) { 42 | continue; 43 | } 44 | 45 | $this->parserCode($str); 46 | } 47 | } 48 | 49 | protected function parserCode(string $str) 50 | { 51 | $arr = explode(" ", $str); 52 | if (count($arr) == 1) { 53 | $str = trim($str, '"'); 54 | $arr = explode("/", $str); 55 | 56 | $this->value[end($arr)] = trim($str, '"'); 57 | } else { 58 | $this->value[$arr[0]] = trim($arr[1], '"'); 59 | } 60 | } 61 | 62 | /** 63 | * @return array 64 | */ 65 | public function getValue(): array 66 | { 67 | return $this->value; 68 | } 69 | 70 | /** 71 | * @param array $value 72 | */ 73 | public function setValue(array $value): void 74 | { 75 | $this->value = $value; 76 | } 77 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/TableCell.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Exception\InvalidArgumentException; 15 | 16 | /** 17 | * @author Abdellatif Ait boudad 18 | */ 19 | class TableCell 20 | { 21 | private $value; 22 | private $options = [ 23 | 'rowspan' => 1, 24 | 'colspan' => 1, 25 | 'style' => null, 26 | ]; 27 | 28 | public function __construct(string $value = '', array $options = []) 29 | { 30 | $this->value = $value; 31 | 32 | // check option names 33 | if ($diff = array_diff(array_keys($options), array_keys($this->options))) { 34 | throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff))); 35 | } 36 | 37 | if (isset($options['style']) && !$options['style'] instanceof TableCellStyle) { 38 | throw new InvalidArgumentException('The style option must be an instance of "TableCellStyle".'); 39 | } 40 | 41 | $this->options = array_merge($this->options, $options); 42 | } 43 | 44 | /** 45 | * Returns the cell value. 46 | * 47 | * @return string 48 | */ 49 | public function __toString() 50 | { 51 | return $this->value; 52 | } 53 | 54 | /** 55 | * Gets number of colspan. 56 | * 57 | * @return int 58 | */ 59 | public function getColspan() 60 | { 61 | return (int) $this->options['colspan']; 62 | } 63 | 64 | /** 65 | * Gets number of rowspan. 66 | * 67 | * @return int 68 | */ 69 | public function getRowspan() 70 | { 71 | return (int) $this->options['rowspan']; 72 | } 73 | 74 | public function getStyle(): ?TableCellStyle 75 | { 76 | return $this->options['style']; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ServiceSubscriberTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | use Psr\Container\ContainerInterface; 15 | 16 | /** 17 | * Implementation of ServiceSubscriberInterface that determines subscribed services from 18 | * private method return types. Service ids are available as "ClassName::methodName". 19 | * 20 | * @author Kevin Bond 21 | */ 22 | trait ServiceSubscriberTrait 23 | { 24 | /** @var ContainerInterface */ 25 | protected $container; 26 | 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | public static function getSubscribedServices(): array 31 | { 32 | static $services; 33 | 34 | if (null !== $services) { 35 | return $services; 36 | } 37 | 38 | $services = \is_callable(['parent', __FUNCTION__]) ? parent::getSubscribedServices() : []; 39 | 40 | foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { 41 | if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { 42 | continue; 43 | } 44 | 45 | if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) { 46 | $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType); 47 | } 48 | } 49 | 50 | return $services; 51 | } 52 | 53 | /** 54 | * @required 55 | */ 56 | public function setContainer(ContainerInterface $container) 57 | { 58 | $this->container = $container; 59 | 60 | if (\is_callable(['parent', __FUNCTION__])) { 61 | return parent::setContainer($container); 62 | } 63 | 64 | return null; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/ProtoHelp/MysqlToProto.php: -------------------------------------------------------------------------------- 1 | controller = $controller; 27 | $this->model = $model; 28 | $this->tableInfo = $tableInfo; 29 | } 30 | 31 | /** 32 | * @return array 33 | */ 34 | public function gen(): array 35 | { 36 | $res = $temp = []; 37 | $i = 1; 38 | foreach ($this->tableInfo['column'] as $name => $column) { 39 | $go_type = $this->getGoType($column, $temp); 40 | $proto_type = $this->getProtoType($column); 41 | $doc = $column['COLUMN_COMMENT'] ?? ""; 42 | $res[$name] = [ 43 | 'name' => $name, 44 | 'go_type' => $go_type, 45 | 'proto_type' => $proto_type, 46 | 'doc' => $doc, 47 | 'proto_str' => "// {$doc}\n {$proto_type} {$name} = {$i};" 48 | ]; 49 | $i++; 50 | } 51 | return $res; 52 | } 53 | 54 | private function getProtoType(array $column): string 55 | { 56 | $type = $column['DATA_TYPE']; 57 | 58 | switch ($type) { 59 | case 'int': 60 | case 'tinyint': 61 | $got = 'int32'; 62 | break; 63 | case 'bigint': 64 | $got = 'int64'; 65 | break; 66 | default: 67 | if (stripos("decimal", $type) !== false || stripos("numeric", $type) !== false) { 68 | $got = 'float'; 69 | } else { 70 | $got = 'string'; 71 | } 72 | break; 73 | } 74 | return $got; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/Dumper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Output\OutputInterface; 15 | use Symfony\Component\VarDumper\Cloner\ClonerInterface; 16 | use Symfony\Component\VarDumper\Cloner\VarCloner; 17 | use Symfony\Component\VarDumper\Dumper\CliDumper; 18 | 19 | /** 20 | * @author Roland Franssen 21 | */ 22 | final class Dumper 23 | { 24 | private $output; 25 | private $dumper; 26 | private $cloner; 27 | private $handler; 28 | 29 | public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) 30 | { 31 | $this->output = $output; 32 | $this->dumper = $dumper; 33 | $this->cloner = $cloner; 34 | 35 | if (class_exists(CliDumper::class)) { 36 | $this->handler = function ($var): string { 37 | $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); 38 | $dumper->setColors($this->output->isDecorated()); 39 | 40 | return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true)); 41 | }; 42 | } else { 43 | $this->handler = function ($var): string { 44 | switch (true) { 45 | case null === $var: 46 | return 'null'; 47 | case true === $var: 48 | return 'true'; 49 | case false === $var: 50 | return 'false'; 51 | case \is_string($var): 52 | return '"'.$var.'"'; 53 | default: 54 | return rtrim(print_r($var, true)); 55 | } 56 | }; 57 | } 58 | } 59 | 60 | public function __invoke($var): string 61 | { 62 | return ($this->handler)($var); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/symfony/console/ConsoleEvents.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console; 13 | 14 | use Symfony\Component\Console\Event\ConsoleCommandEvent; 15 | use Symfony\Component\Console\Event\ConsoleErrorEvent; 16 | use Symfony\Component\Console\Event\ConsoleSignalEvent; 17 | use Symfony\Component\Console\Event\ConsoleTerminateEvent; 18 | 19 | /** 20 | * Contains all events dispatched by an Application. 21 | * 22 | * @author Francesco Levorato 23 | */ 24 | final class ConsoleEvents 25 | { 26 | /** 27 | * The COMMAND event allows you to attach listeners before any command is 28 | * executed by the console. It also allows you to modify the command, input and output 29 | * before they are handed to the command. 30 | * 31 | * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") 32 | */ 33 | public const COMMAND = 'console.command'; 34 | 35 | /** 36 | * The SIGNAL event allows you to perform some actions 37 | * after the command execution was interrupted. 38 | * 39 | * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent") 40 | */ 41 | public const SIGNAL = 'console.signal'; 42 | 43 | /** 44 | * The TERMINATE event allows you to attach listeners after a command is 45 | * executed by the console. 46 | * 47 | * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") 48 | */ 49 | public const TERMINATE = 'console.terminate'; 50 | 51 | /** 52 | * The ERROR event occurs when an uncaught exception or error appears. 53 | * 54 | * This event allows you to deal with the exception/error or 55 | * to modify the thrown exception. 56 | * 57 | * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") 58 | */ 59 | public const ERROR = 'console.error'; 60 | 61 | /** 62 | * Event aliases. 63 | * 64 | * These aliases can be consumed by RegisterListenersPass. 65 | */ 66 | public const ALIASES = [ 67 | ConsoleCommandEvent::class => self::COMMAND, 68 | ConsoleErrorEvent::class => self::ERROR, 69 | ConsoleSignalEvent::class => self::SIGNAL, 70 | ConsoleTerminateEvent::class => self::TERMINATE, 71 | ]; 72 | } 73 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ServiceSubscriberInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | /** 15 | * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. 16 | * 17 | * The getSubscribedServices method returns an array of service types required by such instances, 18 | * optionally keyed by the service names used internally. Service types that start with an interrogation 19 | * mark "?" are optional, while the other ones are mandatory service dependencies. 20 | * 21 | * The injected service locators SHOULD NOT allow access to any other services not specified by the method. 22 | * 23 | * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. 24 | * This interface does not dictate any injection method for these service locators, although constructor 25 | * injection is recommended. 26 | * 27 | * @author Nicolas Grekas 28 | */ 29 | interface ServiceSubscriberInterface 30 | { 31 | /** 32 | * Returns an array of service types required by such instances, optionally keyed by the service names used internally. 33 | * 34 | * For mandatory dependencies: 35 | * 36 | * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name 37 | * internally to fetch a service which must implement Psr\Log\LoggerInterface. 38 | * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name 39 | * internally to fetch an iterable of Psr\Log\LoggerInterface instances. 40 | * * ['Psr\Log\LoggerInterface'] is a shortcut for 41 | * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] 42 | * 43 | * otherwise: 44 | * 45 | * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency 46 | * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency 47 | * * ['?Psr\Log\LoggerInterface'] is a shortcut for 48 | * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] 49 | * 50 | * @return string[] The required service types, optionally keyed by service names 51 | */ 52 | public static function getSubscribedServices(); 53 | } 54 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-intl-grapheme/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Intl\Grapheme as p; 13 | 14 | if (extension_loaded('intl')) { 15 | return; 16 | } 17 | 18 | if (\PHP_VERSION_ID >= 80000) { 19 | return require __DIR__.'/bootstrap80.php'; 20 | } 21 | 22 | if (!defined('GRAPHEME_EXTR_COUNT')) { 23 | define('GRAPHEME_EXTR_COUNT', 0); 24 | } 25 | if (!defined('GRAPHEME_EXTR_MAXBYTES')) { 26 | define('GRAPHEME_EXTR_MAXBYTES', 1); 27 | } 28 | if (!defined('GRAPHEME_EXTR_MAXCHARS')) { 29 | define('GRAPHEME_EXTR_MAXCHARS', 2); 30 | } 31 | 32 | if (!function_exists('grapheme_extract')) { 33 | function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) { return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); } 34 | } 35 | if (!function_exists('grapheme_stripos')) { 36 | function grapheme_stripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); } 37 | } 38 | if (!function_exists('grapheme_stristr')) { 39 | function grapheme_stristr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); } 40 | } 41 | if (!function_exists('grapheme_strlen')) { 42 | function grapheme_strlen($input) { return p\Grapheme::grapheme_strlen($input); } 43 | } 44 | if (!function_exists('grapheme_strpos')) { 45 | function grapheme_strpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); } 46 | } 47 | if (!function_exists('grapheme_strripos')) { 48 | function grapheme_strripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); } 49 | } 50 | if (!function_exists('grapheme_strrpos')) { 51 | function grapheme_strrpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); } 52 | } 53 | if (!function_exists('grapheme_strstr')) { 54 | function grapheme_strstr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); } 55 | } 56 | if (!function_exists('grapheme_substr')) { 57 | function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); } 58 | } 59 | -------------------------------------------------------------------------------- /golang-parser/src/Generate/GoLangFunc.php: -------------------------------------------------------------------------------- 1 | getReturns() as $return) { 17 | if (!$returns) { 18 | $returns .= $return; 19 | } else { 20 | $returns .= ",".$return; 21 | } 22 | } 23 | if (count($this->getReturns()) >= 2) { 24 | $returns = " ({$returns}) "; 25 | }else{ 26 | $returns = " {$returns} "; 27 | } 28 | 29 | // 函数参数 30 | $pars = ""; 31 | foreach ($this->getParameter() as $par) { 32 | if (!$pars) { 33 | $pars .= $par; 34 | } else { 35 | $pars .= ", ".$par; 36 | } 37 | } 38 | 39 | return "func {$this->getName()}({$pars}){$returns}{{$this->getCode()}}"; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getName() 46 | { 47 | return $this->name; 48 | } 49 | 50 | /** 51 | * @param mixed $name 52 | */ 53 | public function setName($name): void 54 | { 55 | $this->name = $name; 56 | } 57 | 58 | /** 59 | * @return array 60 | */ 61 | public function getParameter(): array 62 | { 63 | return $this->parameter; 64 | } 65 | 66 | /** 67 | * @param array $parameter 68 | */ 69 | public function setParameter(array $parameter): void 70 | { 71 | $this->parameter = $parameter; 72 | } 73 | 74 | /** 75 | * @return array 76 | */ 77 | public function getReturns(): array 78 | { 79 | return $this->returns; 80 | } 81 | 82 | /** 83 | * @param array $returns 84 | */ 85 | public function setReturns(array $returns): void 86 | { 87 | $this->returns = $returns; 88 | } 89 | 90 | /** 91 | * @return string 92 | */ 93 | public function getCode(): string 94 | { 95 | return $this->code; 96 | } 97 | 98 | /** 99 | * @param string $code 100 | */ 101 | public function setCode(string $code): void 102 | { 103 | $this->code = $code; 104 | } 105 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Input/StringInput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Input; 13 | 14 | use Symfony\Component\Console\Exception\InvalidArgumentException; 15 | 16 | /** 17 | * StringInput represents an input provided as a string. 18 | * 19 | * Usage: 20 | * 21 | * $input = new StringInput('foo --bar="foobar"'); 22 | * 23 | * @author Fabien Potencier 24 | */ 25 | class StringInput extends ArgvInput 26 | { 27 | public const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); 38 | } 39 | 40 | /** 41 | * Tokenizes a string. 42 | * 43 | * @throws InvalidArgumentException When unable to parse input (should never happen) 44 | */ 45 | private function tokenize(string $input): array 46 | { 47 | $tokens = []; 48 | $length = \strlen($input); 49 | $cursor = 0; 50 | while ($cursor < $length) { 51 | if (preg_match('/\s+/A', $input, $match, 0, $cursor)) { 52 | } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) { 53 | $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1))); 54 | } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) { 55 | $tokens[] = stripcslashes(substr($match[0], 1, -1)); 56 | } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { 57 | $tokens[] = stripcslashes($match[1]); 58 | } else { 59 | // should never happen 60 | throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10))); 61 | } 62 | 63 | $cursor += \strlen($match[0]); 64 | } 65 | 66 | return $tokens; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/TableCellStyle.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Exception\InvalidArgumentException; 15 | 16 | /** 17 | * @author Yewhen Khoptynskyi 18 | */ 19 | class TableCellStyle 20 | { 21 | public const DEFAULT_ALIGN = 'left'; 22 | 23 | private $options = [ 24 | 'fg' => 'default', 25 | 'bg' => 'default', 26 | 'options' => null, 27 | 'align' => self::DEFAULT_ALIGN, 28 | 'cellFormat' => null, 29 | ]; 30 | 31 | private $tagOptions = [ 32 | 'fg', 33 | 'bg', 34 | 'options', 35 | ]; 36 | 37 | private $alignMap = [ 38 | 'left' => \STR_PAD_RIGHT, 39 | 'center' => \STR_PAD_BOTH, 40 | 'right' => \STR_PAD_LEFT, 41 | ]; 42 | 43 | public function __construct(array $options = []) 44 | { 45 | if ($diff = array_diff(array_keys($options), array_keys($this->options))) { 46 | throw new InvalidArgumentException(sprintf('The TableCellStyle does not support the following options: \'%s\'.', implode('\', \'', $diff))); 47 | } 48 | 49 | if (isset($options['align']) && !\array_key_exists($options['align'], $this->alignMap)) { 50 | throw new InvalidArgumentException(sprintf('Wrong align value. Value must be following: \'%s\'.', implode('\', \'', array_keys($this->alignMap)))); 51 | } 52 | 53 | $this->options = array_merge($this->options, $options); 54 | } 55 | 56 | public function getOptions(): array 57 | { 58 | return $this->options; 59 | } 60 | 61 | /** 62 | * Gets options we need for tag for example fg, bg. 63 | * 64 | * @return string[] 65 | */ 66 | public function getTagOptions() 67 | { 68 | return array_filter( 69 | $this->getOptions(), 70 | function ($key) { 71 | return \in_array($key, $this->tagOptions) && isset($this->options[$key]); 72 | }, 73 | \ARRAY_FILTER_USE_KEY 74 | ); 75 | } 76 | 77 | public function getPadByAlign() 78 | { 79 | return $this->alignMap[$this->getOptions()['align']]; 80 | } 81 | 82 | public function getCellFormat(): ?string 83 | { 84 | return $this->getOptions()['cellFormat']; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /vendor/ctfang/proto-parser/src/FileParser/Message/Enum.php: -------------------------------------------------------------------------------- 1 | doc; 22 | } 23 | 24 | /** 25 | * @param mixed $doc 26 | */ 27 | public function setDoc($doc): void 28 | { 29 | $this->doc = $doc; 30 | } 31 | 32 | public function __construct(array $source) 33 | { 34 | $array = array_values($source['code']); 35 | $this->doc = $source['doc']; 36 | $this->name = $array[2]; 37 | 38 | $offset = 0; 39 | for (; $offset < count($array); $offset++) { 40 | if ($array[$offset] == "{") { 41 | $offset++; 42 | break; 43 | } 44 | } 45 | 46 | $arr = []; 47 | $doc = ''; 48 | $init = 0; 49 | for (; $offset < count($array); $offset++) { 50 | $str = $array[$offset]; 51 | if ($init == 0) { 52 | if (!in_array($str, ProtoToArray::Separator)) { 53 | $init++; 54 | } else { 55 | continue; 56 | } 57 | } 58 | if (isset($str[0]) && $str[0] == '/') { 59 | $doc = $str; 60 | } elseif (!in_array($str,["\t",PHP_EOL," "])) { 61 | $arr[] = $str; 62 | if ($str == ";") { 63 | $this->values[] = [ 64 | 'doc' => $doc, 65 | 'name' => $arr[0], 66 | 'num' => $arr[2], 67 | ]; 68 | $doc = ''; 69 | $arr = []; 70 | } 71 | } 72 | } 73 | } 74 | 75 | public function setName($name) 76 | { 77 | $this->name = $name; 78 | } 79 | 80 | public function getName(): string 81 | { 82 | return $this->name; 83 | } 84 | 85 | /** 86 | * @return array 87 | */ 88 | public function getValues(): array 89 | { 90 | return $this->values; 91 | } 92 | 93 | /** 94 | * @param array $values 95 | */ 96 | public function setValues(array $values): void 97 | { 98 | $this->values = $values; 99 | } 100 | } -------------------------------------------------------------------------------- /vendor/symfony/console/Command/ListCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | use Symfony\Component\Console\Helper\DescriptorHelper; 15 | use Symfony\Component\Console\Input\InputArgument; 16 | use Symfony\Component\Console\Input\InputInterface; 17 | use Symfony\Component\Console\Input\InputOption; 18 | use Symfony\Component\Console\Output\OutputInterface; 19 | 20 | /** 21 | * ListCommand displays the list of all available commands for the application. 22 | * 23 | * @author Fabien Potencier 24 | */ 25 | class ListCommand extends Command 26 | { 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | protected function configure() 31 | { 32 | $this 33 | ->setName('list') 34 | ->setDefinition([ 35 | new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), 36 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), 37 | new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), 38 | new InputOption('short', null, InputOption::VALUE_NONE, 'To skip describing commands\' arguments'), 39 | ]) 40 | ->setDescription('List commands') 41 | ->setHelp(<<<'EOF' 42 | The %command.name% command lists all commands: 43 | 44 | %command.full_name% 45 | 46 | You can also display the commands for a specific namespace: 47 | 48 | %command.full_name% test 49 | 50 | You can also output the information in other formats by using the --format option: 51 | 52 | %command.full_name% --format=xml 53 | 54 | It's also possible to get raw list of commands (useful for embedding command runner): 55 | 56 | %command.full_name% --raw 57 | EOF 58 | ) 59 | ; 60 | } 61 | 62 | /** 63 | * {@inheritdoc} 64 | */ 65 | protected function execute(InputInterface $input, OutputInterface $output) 66 | { 67 | $helper = new DescriptorHelper(); 68 | $helper->describe($output, $this->getApplication(), [ 69 | 'format' => $input->getOption('format'), 70 | 'raw_text' => $input->getOption('raw'), 71 | 'namespace' => $input->getArgument('namespace'), 72 | 'short' => $input->getOption('short'), 73 | ]); 74 | 75 | return 0; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /vendor/symfony/console/Command/HelpCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | use Symfony\Component\Console\Helper\DescriptorHelper; 15 | use Symfony\Component\Console\Input\InputArgument; 16 | use Symfony\Component\Console\Input\InputInterface; 17 | use Symfony\Component\Console\Input\InputOption; 18 | use Symfony\Component\Console\Output\OutputInterface; 19 | 20 | /** 21 | * HelpCommand displays the help for a given command. 22 | * 23 | * @author Fabien Potencier 24 | */ 25 | class HelpCommand extends Command 26 | { 27 | private $command; 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | protected function configure() 33 | { 34 | $this->ignoreValidationErrors(); 35 | 36 | $this 37 | ->setName('help') 38 | ->setDefinition([ 39 | new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), 40 | new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), 41 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), 42 | ]) 43 | ->setDescription('Display help for a command') 44 | ->setHelp(<<<'EOF' 45 | The %command.name% command displays help for a given command: 46 | 47 | %command.full_name% list 48 | 49 | You can also output the help in other formats by using the --format option: 50 | 51 | %command.full_name% --format=xml list 52 | 53 | To display the list of available commands, please use the list command. 54 | EOF 55 | ) 56 | ; 57 | } 58 | 59 | public function setCommand(Command $command) 60 | { 61 | $this->command = $command; 62 | } 63 | 64 | /** 65 | * {@inheritdoc} 66 | */ 67 | protected function execute(InputInterface $input, OutputInterface $output) 68 | { 69 | if (null === $this->command) { 70 | $this->command = $this->getApplication()->find($input->getArgument('command_name')); 71 | } 72 | 73 | $helper = new DescriptorHelper(); 74 | $helper->describe($output, $this->command, [ 75 | 'format' => $input->getOption('format'), 76 | 'raw_text' => $input->getOption('raw'), 77 | ]); 78 | 79 | $this->command = null; 80 | 81 | return 0; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /vendor/symfony/console/Tester/CommandTester.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tester; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\ArrayInput; 16 | 17 | /** 18 | * Eases the testing of console commands. 19 | * 20 | * @author Fabien Potencier 21 | * @author Robin Chalas 22 | */ 23 | class CommandTester 24 | { 25 | use TesterTrait; 26 | 27 | private $command; 28 | private $input; 29 | private $statusCode; 30 | 31 | public function __construct(Command $command) 32 | { 33 | $this->command = $command; 34 | } 35 | 36 | /** 37 | * Executes the command. 38 | * 39 | * Available execution options: 40 | * 41 | * * interactive: Sets the input interactive flag 42 | * * decorated: Sets the output decorated flag 43 | * * verbosity: Sets the output verbosity flag 44 | * * capture_stderr_separately: Make output of stdOut and stdErr separately available 45 | * 46 | * @param array $input An array of command arguments and options 47 | * @param array $options An array of execution options 48 | * 49 | * @return int The command exit code 50 | */ 51 | public function execute(array $input, array $options = []) 52 | { 53 | // set the command name automatically if the application requires 54 | // this argument and no command name was passed 55 | if (!isset($input['command']) 56 | && (null !== $application = $this->command->getApplication()) 57 | && $application->getDefinition()->hasArgument('command') 58 | ) { 59 | $input = array_merge(['command' => $this->command->getName()], $input); 60 | } 61 | 62 | $this->input = new ArrayInput($input); 63 | // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. 64 | $this->input->setStream(self::createStream($this->inputs)); 65 | 66 | if (isset($options['interactive'])) { 67 | $this->input->setInteractive($options['interactive']); 68 | } 69 | 70 | if (!isset($options['decorated'])) { 71 | $options['decorated'] = false; 72 | } 73 | 74 | $this->initOutput($options); 75 | 76 | return $this->statusCode = $this->command->run($this->input, $this->output); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/DescriptorHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Descriptor\DescriptorInterface; 15 | use Symfony\Component\Console\Descriptor\JsonDescriptor; 16 | use Symfony\Component\Console\Descriptor\MarkdownDescriptor; 17 | use Symfony\Component\Console\Descriptor\TextDescriptor; 18 | use Symfony\Component\Console\Descriptor\XmlDescriptor; 19 | use Symfony\Component\Console\Exception\InvalidArgumentException; 20 | use Symfony\Component\Console\Output\OutputInterface; 21 | 22 | /** 23 | * This class adds helper method to describe objects in various formats. 24 | * 25 | * @author Jean-François Simon 26 | */ 27 | class DescriptorHelper extends Helper 28 | { 29 | /** 30 | * @var DescriptorInterface[] 31 | */ 32 | private $descriptors = []; 33 | 34 | public function __construct() 35 | { 36 | $this 37 | ->register('txt', new TextDescriptor()) 38 | ->register('xml', new XmlDescriptor()) 39 | ->register('json', new JsonDescriptor()) 40 | ->register('md', new MarkdownDescriptor()) 41 | ; 42 | } 43 | 44 | /** 45 | * Describes an object if supported. 46 | * 47 | * Available options are: 48 | * * format: string, the output format name 49 | * * raw_text: boolean, sets output type as raw 50 | * 51 | * @throws InvalidArgumentException when the given format is not supported 52 | */ 53 | public function describe(OutputInterface $output, ?object $object, array $options = []) 54 | { 55 | $options = array_merge([ 56 | 'raw_text' => false, 57 | 'format' => 'txt', 58 | ], $options); 59 | 60 | if (!isset($this->descriptors[$options['format']])) { 61 | throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); 62 | } 63 | 64 | $descriptor = $this->descriptors[$options['format']]; 65 | $descriptor->describe($output, $object, $options); 66 | } 67 | 68 | /** 69 | * Registers a descriptor. 70 | * 71 | * @return $this 72 | */ 73 | public function register(string $format, DescriptorInterface $descriptor) 74 | { 75 | $this->descriptors[$format] = $descriptor; 76 | 77 | return $this; 78 | } 79 | 80 | /** 81 | * {@inheritdoc} 82 | */ 83 | public function getName() 84 | { 85 | return 'descriptor'; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 | if ($useStaticLoader) { 33 | require __DIR__ . '/autoload_static.php'; 34 | 35 | call_user_func(\Composer\Autoload\ComposerStaticInitfca12d621d853a1aef0b251058a2b167::getInitializer($loader)); 36 | } else { 37 | $map = require __DIR__ . '/autoload_namespaces.php'; 38 | foreach ($map as $namespace => $path) { 39 | $loader->set($namespace, $path); 40 | } 41 | 42 | $map = require __DIR__ . '/autoload_psr4.php'; 43 | foreach ($map as $namespace => $path) { 44 | $loader->setPsr4($namespace, $path); 45 | } 46 | 47 | $classMap = require __DIR__ . '/autoload_classmap.php'; 48 | if ($classMap) { 49 | $loader->addClassMap($classMap); 50 | } 51 | } 52 | 53 | $loader->register(true); 54 | 55 | if ($useStaticLoader) { 56 | $includeFiles = Composer\Autoload\ComposerStaticInitfca12d621d853a1aef0b251058a2b167::$files; 57 | } else { 58 | $includeFiles = require __DIR__ . '/autoload_files.php'; 59 | } 60 | foreach ($includeFiles as $fileIdentifier => $file) { 61 | composerRequirefca12d621d853a1aef0b251058a2b167($fileIdentifier, $file); 62 | } 63 | 64 | return $loader; 65 | } 66 | } 67 | 68 | function composerRequirefca12d621d853a1aef0b251058a2b167($fileIdentifier, $file) 69 | { 70 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 71 | require $file; 72 | 73 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/FormatterHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatter; 15 | 16 | /** 17 | * The Formatter class provides helpers to format messages. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | class FormatterHelper extends Helper 22 | { 23 | /** 24 | * Formats a message within a section. 25 | * 26 | * @return string The format section 27 | */ 28 | public function formatSection(string $section, string $message, string $style = 'info') 29 | { 30 | return sprintf('<%s>[%s] %s', $style, $section, $style, $message); 31 | } 32 | 33 | /** 34 | * Formats a message as a block of text. 35 | * 36 | * @param string|array $messages The message to write in the block 37 | * 38 | * @return string The formatter message 39 | */ 40 | public function formatBlock($messages, string $style, bool $large = false) 41 | { 42 | if (!\is_array($messages)) { 43 | $messages = [$messages]; 44 | } 45 | 46 | $len = 0; 47 | $lines = []; 48 | foreach ($messages as $message) { 49 | $message = OutputFormatter::escape($message); 50 | $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); 51 | $len = max(self::width($message) + ($large ? 4 : 2), $len); 52 | } 53 | 54 | $messages = $large ? [str_repeat(' ', $len)] : []; 55 | for ($i = 0; isset($lines[$i]); ++$i) { 56 | $messages[] = $lines[$i].str_repeat(' ', $len - self::width($lines[$i])); 57 | } 58 | if ($large) { 59 | $messages[] = str_repeat(' ', $len); 60 | } 61 | 62 | for ($i = 0; isset($messages[$i]); ++$i) { 63 | $messages[$i] = sprintf('<%s>%s', $style, $messages[$i], $style); 64 | } 65 | 66 | return implode("\n", $messages); 67 | } 68 | 69 | /** 70 | * Truncates a message to the given length. 71 | * 72 | * @return string 73 | */ 74 | public function truncate(string $message, int $length, string $suffix = '...') 75 | { 76 | $computedLength = $length - self::width($suffix); 77 | 78 | if ($computedLength > self::width($message)) { 79 | return $message; 80 | } 81 | 82 | return self::substr($message, 0, $length).$suffix; 83 | } 84 | 85 | /** 86 | * {@inheritdoc} 87 | */ 88 | public function getName() 89 | { 90 | return 'formatter'; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /vendor/symfony/console/Helper/HelperSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Exception\InvalidArgumentException; 16 | 17 | /** 18 | * HelperSet represents a set of helpers to be used with a command. 19 | * 20 | * @author Fabien Potencier 21 | */ 22 | class HelperSet implements \IteratorAggregate 23 | { 24 | /** 25 | * @var Helper[] 26 | */ 27 | private $helpers = []; 28 | private $command; 29 | 30 | /** 31 | * @param Helper[] $helpers An array of helper 32 | */ 33 | public function __construct(array $helpers = []) 34 | { 35 | foreach ($helpers as $alias => $helper) { 36 | $this->set($helper, \is_int($alias) ? null : $alias); 37 | } 38 | } 39 | 40 | public function set(HelperInterface $helper, string $alias = null) 41 | { 42 | $this->helpers[$helper->getName()] = $helper; 43 | if (null !== $alias) { 44 | $this->helpers[$alias] = $helper; 45 | } 46 | 47 | $helper->setHelperSet($this); 48 | } 49 | 50 | /** 51 | * Returns true if the helper if defined. 52 | * 53 | * @return bool true if the helper is defined, false otherwise 54 | */ 55 | public function has(string $name) 56 | { 57 | return isset($this->helpers[$name]); 58 | } 59 | 60 | /** 61 | * Gets a helper value. 62 | * 63 | * @return HelperInterface The helper instance 64 | * 65 | * @throws InvalidArgumentException if the helper is not defined 66 | */ 67 | public function get(string $name) 68 | { 69 | if (!$this->has($name)) { 70 | throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); 71 | } 72 | 73 | return $this->helpers[$name]; 74 | } 75 | 76 | public function setCommand(Command $command = null) 77 | { 78 | $this->command = $command; 79 | } 80 | 81 | /** 82 | * Gets the command associated with this helper set. 83 | * 84 | * @return Command A Command instance 85 | */ 86 | public function getCommand() 87 | { 88 | return $this->command; 89 | } 90 | 91 | /** 92 | * @return \Traversable 93 | */ 94 | #[\ReturnTypeWillChange] 95 | public function getIterator() 96 | { 97 | return new \ArrayIterator($this->helpers); 98 | } 99 | } 100 | --------------------------------------------------------------------------------