├── .dockerignore
├── Dockerfile
├── LICENSE
├── README.md
├── app
├── controller
│ └── Index.php
├── model
│ └── Counters.php
└── view
│ └── index.html
├── composer.json
├── composer.lock
├── conf
├── fpm.conf
├── nginx.conf
└── php.ini
├── config
├── app.php
├── cache.php
├── console.php
├── cookie.php
├── database.php
├── filesystem.php
├── lang.php
├── log.php
├── middleware.php
├── route.php
├── session.php
├── trace.php
└── view.php
├── container.config.json
├── public
├── .htaccess
├── favicon.ico
├── index.php
└── router.php
├── route
└── app.php
├── run.sh
├── runtime
└── .gitignore
├── think
└── vendor
├── autoload.php
├── bin
└── var-dump-server
├── composer
├── ClassLoader.php
├── InstalledVersions.php
├── LICENSE
├── autoload_classmap.php
├── autoload_files.php
├── autoload_namespaces.php
├── autoload_psr4.php
├── autoload_real.php
├── autoload_static.php
├── installed.json
├── installed.php
└── platform_check.php
├── league
├── flysystem-cached-adapter
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .php_cs
│ ├── .scrutinizer.yml
│ ├── .travis.yml
│ ├── LICENSE
│ ├── clover
│ │ └── .gitignore
│ ├── composer.json
│ ├── phpspec.yml
│ ├── phpunit.php
│ ├── phpunit.xml
│ ├── readme.md
│ ├── spec
│ │ └── CachedAdapterSpec.php
│ ├── src
│ │ ├── CacheInterface.php
│ │ ├── CachedAdapter.php
│ │ └── Storage
│ │ │ ├── AbstractCache.php
│ │ │ ├── Adapter.php
│ │ │ ├── Memcached.php
│ │ │ ├── Memory.php
│ │ │ ├── Noop.php
│ │ │ ├── PhpRedis.php
│ │ │ ├── Predis.php
│ │ │ ├── Psr6Cache.php
│ │ │ └── Stash.php
│ └── tests
│ │ ├── AdapterCacheTests.php
│ │ ├── InspectionTests.php
│ │ ├── MemcachedTests.php
│ │ ├── MemoryCacheTests.php
│ │ ├── NoopCacheTests.php
│ │ ├── PhpRedisTests.php
│ │ ├── PredisTests.php
│ │ ├── Psr6CacheTest.php
│ │ └── StashTest.php
└── flysystem
│ ├── LICENSE
│ ├── SECURITY.md
│ ├── composer.json
│ ├── deprecations.md
│ └── src
│ ├── Adapter
│ ├── AbstractAdapter.php
│ ├── AbstractFtpAdapter.php
│ ├── CanOverwriteFiles.php
│ ├── Ftp.php
│ ├── Ftpd.php
│ ├── Local.php
│ ├── NullAdapter.php
│ ├── Polyfill
│ │ ├── NotSupportingVisibilityTrait.php
│ │ ├── StreamedCopyTrait.php
│ │ ├── StreamedReadingTrait.php
│ │ ├── StreamedTrait.php
│ │ └── StreamedWritingTrait.php
│ └── SynologyFtp.php
│ ├── AdapterInterface.php
│ ├── Config.php
│ ├── ConfigAwareTrait.php
│ ├── ConnectionErrorException.php
│ ├── ConnectionRuntimeException.php
│ ├── Directory.php
│ ├── Exception.php
│ ├── File.php
│ ├── FileExistsException.php
│ ├── FileNotFoundException.php
│ ├── Filesystem.php
│ ├── FilesystemException.php
│ ├── FilesystemInterface.php
│ ├── FilesystemNotFoundException.php
│ ├── Handler.php
│ ├── InvalidRootException.php
│ ├── MountManager.php
│ ├── NotSupportedException.php
│ ├── Plugin
│ ├── AbstractPlugin.php
│ ├── EmptyDir.php
│ ├── ForcedCopy.php
│ ├── ForcedRename.php
│ ├── GetWithMetadata.php
│ ├── ListFiles.php
│ ├── ListPaths.php
│ ├── ListWith.php
│ ├── PluggableTrait.php
│ └── PluginNotFoundException.php
│ ├── PluginInterface.php
│ ├── ReadInterface.php
│ ├── RootViolationException.php
│ ├── SafeStorage.php
│ ├── UnreadableFileException.php
│ ├── Util.php
│ └── Util
│ ├── ContentListingFormatter.php
│ ├── MimeType.php
│ └── StreamHasher.php
├── psr
├── cache
│ ├── CHANGELOG.md
│ ├── LICENSE.txt
│ ├── README.md
│ ├── composer.json
│ └── src
│ │ ├── CacheException.php
│ │ ├── CacheItemInterface.php
│ │ ├── CacheItemPoolInterface.php
│ │ └── InvalidArgumentException.php
├── container
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── composer.json
│ └── src
│ │ ├── ContainerExceptionInterface.php
│ │ ├── ContainerInterface.php
│ │ └── NotFoundExceptionInterface.php
├── log
│ ├── LICENSE
│ ├── Psr
│ │ └── Log
│ │ │ ├── AbstractLogger.php
│ │ │ ├── InvalidArgumentException.php
│ │ │ ├── LogLevel.php
│ │ │ ├── LoggerAwareInterface.php
│ │ │ ├── LoggerAwareTrait.php
│ │ │ ├── LoggerInterface.php
│ │ │ ├── LoggerTrait.php
│ │ │ ├── NullLogger.php
│ │ │ └── Test
│ │ │ ├── DummyTest.php
│ │ │ ├── LoggerInterfaceTest.php
│ │ │ └── TestLogger.php
│ ├── README.md
│ └── composer.json
└── simple-cache
│ ├── .editorconfig
│ ├── LICENSE.md
│ ├── README.md
│ ├── composer.json
│ └── src
│ ├── CacheException.php
│ ├── CacheInterface.php
│ └── InvalidArgumentException.php
├── services.php
├── symfony
├── polyfill-mbstring
│ ├── LICENSE
│ ├── Mbstring.php
│ ├── README.md
│ ├── Resources
│ │ └── unidata
│ │ │ ├── lowerCase.php
│ │ │ ├── titleCaseRegexp.php
│ │ │ └── upperCase.php
│ ├── bootstrap.php
│ ├── bootstrap80.php
│ └── composer.json
├── polyfill-php72
│ ├── LICENSE
│ ├── Php72.php
│ ├── README.md
│ ├── bootstrap.php
│ └── composer.json
├── polyfill-php80
│ ├── LICENSE
│ ├── Php80.php
│ ├── README.md
│ ├── Resources
│ │ └── stubs
│ │ │ ├── Attribute.php
│ │ │ ├── Stringable.php
│ │ │ ├── UnhandledMatchError.php
│ │ │ └── ValueError.php
│ ├── bootstrap.php
│ └── composer.json
└── var-dumper
│ ├── CHANGELOG.md
│ ├── Caster
│ ├── AmqpCaster.php
│ ├── ArgsStub.php
│ ├── Caster.php
│ ├── ClassStub.php
│ ├── ConstStub.php
│ ├── CutArrayStub.php
│ ├── CutStub.php
│ ├── DOMCaster.php
│ ├── DateCaster.php
│ ├── DoctrineCaster.php
│ ├── DsCaster.php
│ ├── DsPairStub.php
│ ├── EnumStub.php
│ ├── ExceptionCaster.php
│ ├── FrameStub.php
│ ├── GmpCaster.php
│ ├── ImagineCaster.php
│ ├── ImgStub.php
│ ├── IntlCaster.php
│ ├── LinkStub.php
│ ├── MemcachedCaster.php
│ ├── PdoCaster.php
│ ├── PgSqlCaster.php
│ ├── ProxyManagerCaster.php
│ ├── RedisCaster.php
│ ├── ReflectionCaster.php
│ ├── ResourceCaster.php
│ ├── SplCaster.php
│ ├── StubCaster.php
│ ├── SymfonyCaster.php
│ ├── TraceStub.php
│ ├── UuidCaster.php
│ ├── XmlReaderCaster.php
│ └── XmlResourceCaster.php
│ ├── Cloner
│ ├── AbstractCloner.php
│ ├── ClonerInterface.php
│ ├── Cursor.php
│ ├── Data.php
│ ├── DumperInterface.php
│ ├── Stub.php
│ └── VarCloner.php
│ ├── Command
│ ├── Descriptor
│ │ ├── CliDescriptor.php
│ │ ├── DumpDescriptorInterface.php
│ │ └── HtmlDescriptor.php
│ └── ServerDumpCommand.php
│ ├── Dumper
│ ├── AbstractDumper.php
│ ├── CliDumper.php
│ ├── ContextProvider
│ │ ├── CliContextProvider.php
│ │ ├── ContextProviderInterface.php
│ │ ├── RequestContextProvider.php
│ │ └── SourceContextProvider.php
│ ├── ContextualizedDumper.php
│ ├── DataDumperInterface.php
│ ├── HtmlDumper.php
│ └── ServerDumper.php
│ ├── Exception
│ └── ThrowingCasterException.php
│ ├── LICENSE
│ ├── README.md
│ ├── Resources
│ ├── bin
│ │ └── var-dump-server
│ ├── css
│ │ └── htmlDescriptor.css
│ ├── functions
│ │ └── dump.php
│ └── js
│ │ └── htmlDescriptor.js
│ ├── Server
│ ├── Connection.php
│ └── DumpServer.php
│ ├── Test
│ └── VarDumperTestTrait.php
│ ├── VarDumper.php
│ └── composer.json
└── topthink
├── framework
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── composer.json
├── logo.png
├── phpunit.xml.dist
├── src
│ ├── helper.php
│ ├── lang
│ │ └── zh-cn.php
│ ├── think
│ │ ├── App.php
│ │ ├── Cache.php
│ │ ├── Config.php
│ │ ├── Console.php
│ │ ├── Container.php
│ │ ├── Cookie.php
│ │ ├── Db.php
│ │ ├── Env.php
│ │ ├── Event.php
│ │ ├── Exception.php
│ │ ├── Facade.php
│ │ ├── File.php
│ │ ├── Filesystem.php
│ │ ├── Http.php
│ │ ├── Lang.php
│ │ ├── Log.php
│ │ ├── Manager.php
│ │ ├── Middleware.php
│ │ ├── Pipeline.php
│ │ ├── Request.php
│ │ ├── Response.php
│ │ ├── Route.php
│ │ ├── Service.php
│ │ ├── Session.php
│ │ ├── Validate.php
│ │ ├── View.php
│ │ ├── cache
│ │ │ ├── Driver.php
│ │ │ ├── TagSet.php
│ │ │ └── driver
│ │ │ │ ├── File.php
│ │ │ │ ├── Memcache.php
│ │ │ │ ├── Memcached.php
│ │ │ │ ├── Redis.php
│ │ │ │ └── Wincache.php
│ │ ├── console
│ │ │ ├── Command.php
│ │ │ ├── Input.php
│ │ │ ├── LICENSE
│ │ │ ├── Output.php
│ │ │ ├── Table.php
│ │ │ ├── bin
│ │ │ │ ├── README.md
│ │ │ │ └── hiddeninput.exe
│ │ │ ├── command
│ │ │ │ ├── Clear.php
│ │ │ │ ├── Help.php
│ │ │ │ ├── Lists.php
│ │ │ │ ├── Make.php
│ │ │ │ ├── RouteList.php
│ │ │ │ ├── RunServer.php
│ │ │ │ ├── ServiceDiscover.php
│ │ │ │ ├── VendorPublish.php
│ │ │ │ ├── Version.php
│ │ │ │ ├── make
│ │ │ │ │ ├── Command.php
│ │ │ │ │ ├── Controller.php
│ │ │ │ │ ├── Event.php
│ │ │ │ │ ├── Listener.php
│ │ │ │ │ ├── Middleware.php
│ │ │ │ │ ├── Model.php
│ │ │ │ │ ├── Service.php
│ │ │ │ │ ├── Subscribe.php
│ │ │ │ │ ├── Validate.php
│ │ │ │ │ └── stubs
│ │ │ │ │ │ ├── command.stub
│ │ │ │ │ │ ├── controller.api.stub
│ │ │ │ │ │ ├── controller.plain.stub
│ │ │ │ │ │ ├── controller.stub
│ │ │ │ │ │ ├── event.stub
│ │ │ │ │ │ ├── listener.stub
│ │ │ │ │ │ ├── middleware.stub
│ │ │ │ │ │ ├── model.stub
│ │ │ │ │ │ ├── service.stub
│ │ │ │ │ │ ├── subscribe.stub
│ │ │ │ │ │ └── validate.stub
│ │ │ │ └── optimize
│ │ │ │ │ ├── Route.php
│ │ │ │ │ └── Schema.php
│ │ │ ├── input
│ │ │ │ ├── Argument.php
│ │ │ │ ├── Definition.php
│ │ │ │ └── Option.php
│ │ │ └── output
│ │ │ │ ├── Ask.php
│ │ │ │ ├── Descriptor.php
│ │ │ │ ├── Formatter.php
│ │ │ │ ├── Question.php
│ │ │ │ ├── descriptor
│ │ │ │ └── Console.php
│ │ │ │ ├── driver
│ │ │ │ ├── Buffer.php
│ │ │ │ ├── Console.php
│ │ │ │ └── Nothing.php
│ │ │ │ ├── formatter
│ │ │ │ ├── Stack.php
│ │ │ │ └── Style.php
│ │ │ │ └── question
│ │ │ │ ├── Choice.php
│ │ │ │ └── Confirmation.php
│ │ ├── contract
│ │ │ ├── CacheHandlerInterface.php
│ │ │ ├── LogHandlerInterface.php
│ │ │ ├── ModelRelationInterface.php
│ │ │ ├── SessionHandlerInterface.php
│ │ │ └── TemplateHandlerInterface.php
│ │ ├── event
│ │ │ ├── AppInit.php
│ │ │ ├── HttpEnd.php
│ │ │ ├── HttpRun.php
│ │ │ ├── LogRecord.php
│ │ │ ├── LogWrite.php
│ │ │ └── RouteLoaded.php
│ │ ├── exception
│ │ │ ├── ClassNotFoundException.php
│ │ │ ├── ErrorException.php
│ │ │ ├── FileException.php
│ │ │ ├── FuncNotFoundException.php
│ │ │ ├── Handle.php
│ │ │ ├── HttpException.php
│ │ │ ├── HttpResponseException.php
│ │ │ ├── InvalidArgumentException.php
│ │ │ ├── RouteNotFoundException.php
│ │ │ └── ValidateException.php
│ │ ├── facade
│ │ │ ├── App.php
│ │ │ ├── Cache.php
│ │ │ ├── Config.php
│ │ │ ├── Console.php
│ │ │ ├── Cookie.php
│ │ │ ├── Env.php
│ │ │ ├── Event.php
│ │ │ ├── Filesystem.php
│ │ │ ├── Lang.php
│ │ │ ├── Log.php
│ │ │ ├── Middleware.php
│ │ │ ├── Request.php
│ │ │ ├── Route.php
│ │ │ ├── Session.php
│ │ │ ├── Validate.php
│ │ │ └── View.php
│ │ ├── file
│ │ │ └── UploadedFile.php
│ │ ├── filesystem
│ │ │ ├── CacheStore.php
│ │ │ ├── Driver.php
│ │ │ └── driver
│ │ │ │ └── Local.php
│ │ ├── initializer
│ │ │ ├── BootService.php
│ │ │ ├── Error.php
│ │ │ └── RegisterService.php
│ │ ├── log
│ │ │ ├── Channel.php
│ │ │ ├── ChannelSet.php
│ │ │ └── driver
│ │ │ │ ├── File.php
│ │ │ │ └── Socket.php
│ │ ├── middleware
│ │ │ ├── AllowCrossDomain.php
│ │ │ ├── CheckRequestCache.php
│ │ │ ├── FormTokenCheck.php
│ │ │ ├── LoadLangPack.php
│ │ │ └── SessionInit.php
│ │ ├── response
│ │ │ ├── File.php
│ │ │ ├── Html.php
│ │ │ ├── Json.php
│ │ │ ├── Jsonp.php
│ │ │ ├── Redirect.php
│ │ │ ├── View.php
│ │ │ └── Xml.php
│ │ ├── route
│ │ │ ├── Dispatch.php
│ │ │ ├── Domain.php
│ │ │ ├── Resource.php
│ │ │ ├── Rule.php
│ │ │ ├── RuleGroup.php
│ │ │ ├── RuleItem.php
│ │ │ ├── RuleName.php
│ │ │ ├── Url.php
│ │ │ └── dispatch
│ │ │ │ ├── Callback.php
│ │ │ │ ├── Controller.php
│ │ │ │ └── Url.php
│ │ ├── service
│ │ │ ├── ModelService.php
│ │ │ ├── PaginatorService.php
│ │ │ └── ValidateService.php
│ │ ├── session
│ │ │ ├── Store.php
│ │ │ └── driver
│ │ │ │ ├── Cache.php
│ │ │ │ └── File.php
│ │ ├── validate
│ │ │ └── ValidateRule.php
│ │ └── view
│ │ │ └── driver
│ │ │ └── Php.php
│ └── tpl
│ │ └── think_exception.tpl
└── tests
│ ├── AppTest.php
│ ├── CacheTest.php
│ ├── ConfigTest.php
│ ├── ContainerTest.php
│ ├── DbTest.php
│ ├── EnvTest.php
│ ├── EventTest.php
│ ├── FilesystemTest.php
│ ├── HttpTest.php
│ ├── InteractsWithApp.php
│ ├── LogTest.php
│ ├── MiddlewareTest.php
│ ├── RouteTest.php
│ ├── SessionTest.php
│ ├── ViewTest.php
│ └── bootstrap.php
├── think-helper
├── .gitignore
├── LICENSE
├── README.md
├── composer.json
└── src
│ ├── Collection.php
│ ├── contract
│ ├── Arrayable.php
│ └── Jsonable.php
│ ├── helper.php
│ └── helper
│ ├── Arr.php
│ └── Str.php
├── think-orm
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── composer.json
├── src
│ ├── DbManager.php
│ ├── Model.php
│ ├── Paginator.php
│ ├── db
│ │ ├── BaseQuery.php
│ │ ├── Builder.php
│ │ ├── CacheItem.php
│ │ ├── Connection.php
│ │ ├── ConnectionInterface.php
│ │ ├── Fetch.php
│ │ ├── Mongo.php
│ │ ├── PDOConnection.php
│ │ ├── Query.php
│ │ ├── Raw.php
│ │ ├── Where.php
│ │ ├── builder
│ │ │ ├── Mongo.php
│ │ │ ├── Mysql.php
│ │ │ ├── Oracle.php
│ │ │ ├── Pgsql.php
│ │ │ ├── Sqlite.php
│ │ │ └── Sqlsrv.php
│ │ ├── concern
│ │ │ ├── AggregateQuery.php
│ │ │ ├── JoinAndViewQuery.php
│ │ │ ├── ModelRelationQuery.php
│ │ │ ├── ParamsBind.php
│ │ │ ├── ResultOperation.php
│ │ │ ├── TableFieldInfo.php
│ │ │ ├── TimeFieldQuery.php
│ │ │ ├── Transaction.php
│ │ │ └── WhereQuery.php
│ │ ├── connector
│ │ │ ├── Mongo.php
│ │ │ ├── Mysql.php
│ │ │ ├── Oracle.php
│ │ │ ├── Pgsql.php
│ │ │ ├── Sqlite.php
│ │ │ ├── Sqlsrv.php
│ │ │ └── pgsql.sql
│ │ └── exception
│ │ │ ├── BindParamException.php
│ │ │ ├── DataNotFoundException.php
│ │ │ ├── DbEventException.php
│ │ │ ├── DbException.php
│ │ │ ├── InvalidArgumentException.php
│ │ │ ├── ModelEventException.php
│ │ │ ├── ModelNotFoundException.php
│ │ │ └── PDOException.php
│ ├── facade
│ │ └── Db.php
│ ├── model
│ │ ├── Collection.php
│ │ ├── Pivot.php
│ │ ├── Relation.php
│ │ ├── concern
│ │ │ ├── Attribute.php
│ │ │ ├── Conversion.php
│ │ │ ├── ModelEvent.php
│ │ │ ├── OptimLock.php
│ │ │ ├── RelationShip.php
│ │ │ ├── SoftDelete.php
│ │ │ ├── TimeStamp.php
│ │ │ └── Virtual.php
│ │ └── relation
│ │ │ ├── BelongsTo.php
│ │ │ ├── BelongsToMany.php
│ │ │ ├── HasMany.php
│ │ │ ├── HasManyThrough.php
│ │ │ ├── HasOne.php
│ │ │ ├── HasOneThrough.php
│ │ │ ├── MorphMany.php
│ │ │ ├── MorphOne.php
│ │ │ ├── MorphTo.php
│ │ │ ├── MorphToMany.php
│ │ │ └── OneToOne.php
│ └── paginator
│ │ └── driver
│ │ └── Bootstrap.php
└── stubs
│ ├── Exception.php
│ ├── Facade.php
│ └── load_stubs.php
└── think-trace
├── .gitignore
├── LICENSE
├── README.md
├── composer.json
└── src
├── Console.php
├── Html.php
├── Service.php
├── TraceDebug.php
├── config.php
└── tpl
└── page_trace.tpl
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | .dockerignore
3 | Dockerfile*
4 | composer*
5 | container.config.json
6 | LICENSE
7 | README.md
8 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # 二开推荐阅读[如何提高项目构建效率](https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/scene/build/speed.html)
2 | # 选择构建用基础镜像(选择原则:在包含所有用到的依赖前提下尽可能体积小)。如需更换,请到[dockerhub官方仓库](https://hub.docker.com/_/php?tab=tags)自行选择后替换。
3 | FROM alpine:3.13
4 |
5 | # 容器默认时区为UTC,如需使用上海时间请启用以下时区设置命令
6 | # RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone
7 |
8 | # 使用 HTTPS 协议访问容器云调用证书安装
9 | RUN apk add ca-certificates
10 |
11 | # 安装依赖包,如需其他依赖包,请到alpine依赖包管理(https://pkgs.alpinelinux.org/packages?name=php8*imagick*&branch=v3.13)查找。
12 | # 选用国内镜像源以提高下载速度
13 | RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories \
14 | && apk add --update --no-cache \
15 | php7 \
16 | php7-json \
17 | php7-ctype \
18 | php7-exif \
19 | php7-pdo \
20 | php7-pdo_mysql \
21 | php7-fpm \
22 | php7-curl \
23 | nginx \
24 | && rm -f /var/cache/apk/*
25 |
26 | # 设定工作目录
27 | WORKDIR /app
28 |
29 | # 将当前目录下所有文件拷贝到/app (.dockerignore中文件除外)
30 | COPY . /app
31 |
32 | # 替换nginx、fpm、php配置
33 | RUN cp /app/conf/nginx.conf /etc/nginx/conf.d/default.conf \
34 | && cp /app/conf/fpm.conf /etc/php7/php-fpm.d/www.conf \
35 | && cp /app/conf/php.ini /etc/php7/php.ini \
36 | && mkdir -p /run/nginx \
37 | && chmod -R 777 /app/runtime \
38 | && mv /usr/sbin/php-fpm7 /usr/sbin/php-fpm
39 |
40 | # 暴露端口
41 | # 此处端口必须与「服务设置」-「流水线」以及「手动上传代码包」部署时填写的端口一致,否则会部署失败。
42 | EXPOSE 80
43 |
44 | # 执行启动命令.
45 | # 写多行独立的CMD命令是错误写法!只有最后一行CMD命令会被执行,之前的都会被忽略,导致业务报错。
46 | # 请参考[Docker官方文档之CMD命令](https://docs.docker.com/engine/reference/builder/#cmd)
47 | CMD ["sh", "run.sh"]
48 |
49 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Tencent
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.
--------------------------------------------------------------------------------
/app/model/Counters.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace app\model;
13 |
14 | use think\Model;
15 |
16 | // Counters 定义数据库model
17 | class Counters extends Model
18 | {
19 | protected $table = 'Counters';
20 | public $id;
21 | public $count;
22 | public $createdAt;
23 | public $updateAt;
24 | }
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/think",
3 | "description": "the new thinkphp framework",
4 | "type": "project",
5 | "keywords": [
6 | "framework",
7 | "thinkphp",
8 | "ORM"
9 | ],
10 | "homepage": "http://thinkphp.cn/",
11 | "license": "Apache-2.0",
12 | "authors": [
13 | {
14 | "name": "liu21st",
15 | "email": "liu21st@gmail.com"
16 | },
17 | {
18 | "name": "yunwuxin",
19 | "email": "448901948@qq.com"
20 | }
21 | ],
22 | "require": {
23 | "php": "^7.2",
24 | "topthink/framework": "^6.0.0",
25 | "topthink/think-orm": "^2.0"
26 | },
27 | "require-dev": {
28 | "symfony/var-dumper": "^4.2",
29 | "topthink/think-trace":"^1.0"
30 | },
31 | "autoload": {
32 | "psr-4": {
33 | "app\\": "app"
34 | },
35 | "psr-0": {
36 | "": "extend/"
37 | }
38 | },
39 | "config": {
40 | "preferred-install": "dist"
41 | },
42 | "scripts": {
43 | "post-autoload-dump": [
44 | "@php think service:discover",
45 | "@php think vendor:publish"
46 | ]
47 | }
48 | }
--------------------------------------------------------------------------------
/conf/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 | root /app/public;
5 | index index.html index.htm index.php;
6 | error_page 404 /404.html;
7 | error_page 500 502 503 504 /50x.html;
8 |
9 | location / {
10 | try_files $uri @rewrite;
11 | }
12 |
13 | location @rewrite {
14 | set $static 0;
15 | if ($uri ~ \.(css|js|jpg|jpeg|png|gif|ico|woff|eot|svg|css\.map|min\.map)$) {
16 | set $static 1;
17 | }
18 | if ($static = 0) {
19 | rewrite ^/(.*)$ /index.php?s=/$1;
20 | }
21 | }
22 | location ~ /Uploads/.*\.php$ {
23 | deny all;
24 | }
25 | location ~ \.php$ {
26 | fastcgi_pass 127.0.0.1:9000;
27 | fastcgi_index index.php;
28 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
29 | include fastcgi_params;
30 | }
31 |
32 | location ~ /\.ht {
33 | deny all;
34 | }
35 | }
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('app.host', ''),
9 | // 应用的命名空间
10 | 'app_namespace' => '',
11 | // 是否启用路由
12 | 'with_route' => true,
13 | // 默认应用
14 | 'default_app' => 'index',
15 | // 默认时区
16 | 'default_timezone' => 'Asia/Shanghai',
17 |
18 | // 应用映射(自动多应用模式有效)
19 | 'app_map' => [],
20 | // 域名绑定(自动多应用模式有效)
21 | 'domain_bind' => [],
22 | // 禁止URL访问的应用列表(自动多应用模式有效)
23 | 'deny_app_list' => [],
24 |
25 | // 异常页面的模板文件
26 | 'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
27 |
28 | // 错误显示信息,非调试模式有效
29 | 'error_message' => '页面错误!请稍后再试~',
30 | // 显示错误信息
31 | 'show_error_msg' => true,
32 | ];
33 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('cache.driver', 'file'),
10 |
11 | // 缓存连接方式配置
12 | 'stores' => [
13 | 'file' => [
14 | // 驱动方式
15 | 'type' => 'File',
16 | // 缓存保存目录
17 | 'path' => '',
18 | // 缓存前缀
19 | 'prefix' => '',
20 | // 缓存有效期 0表示永久缓存
21 | 'expire' => 0,
22 | // 缓存标签前缀
23 | 'tag_prefix' => 'tag:',
24 | // 序列化机制 例如 ['serialize', 'unserialize']
25 | 'serialize' => [],
26 | ],
27 | // 更多的缓存连接
28 | ],
29 | ];
30 |
--------------------------------------------------------------------------------
/config/console.php:
--------------------------------------------------------------------------------
1 | [
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/config/cookie.php:
--------------------------------------------------------------------------------
1 | 0,
8 | // cookie 保存路径
9 | 'path' => '/',
10 | // cookie 有效域名
11 | 'domain' => '',
12 | // cookie 启用安全传输
13 | 'secure' => false,
14 | // httponly设置
15 | 'httponly' => false,
16 | // 是否使用 setcookie
17 | 'setcookie' => true,
18 | // samesite 设置,支持 'strict' 'lax'
19 | 'samesite' => '',
20 | ];
21 |
--------------------------------------------------------------------------------
/config/filesystem.php:
--------------------------------------------------------------------------------
1 | env('filesystem.driver', 'local'),
6 | // 磁盘列表
7 | 'disks' => [
8 | 'local' => [
9 | 'type' => 'local',
10 | 'root' => app()->getRuntimePath() . 'storage',
11 | ],
12 | 'public' => [
13 | // 磁盘类型
14 | 'type' => 'local',
15 | // 磁盘路径
16 | 'root' => app()->getRootPath() . 'public/storage',
17 | // 磁盘路径对应的外部URL路径
18 | 'url' => '/storage',
19 | // 可见性
20 | 'visibility' => 'public',
21 | ],
22 | // 更多的磁盘配置信息
23 | ],
24 | ];
25 |
--------------------------------------------------------------------------------
/config/lang.php:
--------------------------------------------------------------------------------
1 | env('lang.default_lang', 'zh-cn'),
9 | // 允许的语言列表
10 | 'allow_lang_list' => [],
11 | // 多语言自动侦测变量名
12 | 'detect_var' => 'lang',
13 | // 是否使用Cookie记录
14 | 'use_cookie' => true,
15 | // 多语言cookie变量
16 | 'cookie_var' => 'think_lang',
17 | // 多语言header变量
18 | 'header_var' => 'think-lang',
19 | // 扩展语言包
20 | 'extend_list' => [],
21 | // Accept-Language转义为对应语言包名称
22 | 'accept_language' => [
23 | 'zh-hans-cn' => 'zh-cn',
24 | ],
25 | // 是否支持语言分组
26 | 'allow_group' => false,
27 | ];
28 |
--------------------------------------------------------------------------------
/config/log.php:
--------------------------------------------------------------------------------
1 | env('log.channel', 'file'),
10 | // 日志记录级别
11 | 'level' => ['info', 'warning', 'error', 'critical', 'alert', 'emergency'],
12 | // 日志类型记录的通道 ['error'=>'email',...]
13 | 'type_channel' => [],
14 | // 关闭全局日志写入
15 | 'close' => false,
16 | // 全局日志处理 支持闭包
17 | 'processor' => null,
18 |
19 | // 日志通道列表
20 | 'channels' => [
21 | 'file' => [
22 | // 日志记录方式
23 | 'type' => 'File',
24 | // 日志保存目录
25 | 'path' => '', // 默认日志在/app/runtime/log/目录下
26 | // 单文件日志写入
27 | 'single' => false,
28 | // 独立日志级别
29 | 'apart_level' => [],
30 | // 最大日志文件数量
31 | 'max_files' => 0,
32 | // 使用JSON格式记录
33 | 'json' => false,
34 | // 日志处理
35 | 'processor' => null,
36 | // 关闭通道日志写入
37 | 'close' => false,
38 | // 日志输出格式化
39 | 'format' => '[%s][%s] %s',
40 | // 是否实时写入
41 | 'realtime_write' => false,
42 | ],
43 | // 其它日志通道配置
44 | ],
45 |
46 | ];
47 |
--------------------------------------------------------------------------------
/config/middleware.php:
--------------------------------------------------------------------------------
1 | [],
6 | // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
7 | 'priority' => [],
8 | ];
9 |
--------------------------------------------------------------------------------
/config/route.php:
--------------------------------------------------------------------------------
1 | '/',
9 | // URL伪静态后缀
10 | 'url_html_suffix' => 'html',
11 | // URL普通方式参数 用于自动生成
12 | 'url_common_param' => true,
13 | // 是否开启路由延迟解析
14 | 'url_lazy_route' => false,
15 | // 是否强制使用路由
16 | 'url_route_must' => false,
17 | // 合并路由规则
18 | 'route_rule_merge' => false,
19 | // 路由是否完全匹配
20 | 'route_complete_match' => false,
21 | // 访问控制器层名称
22 | 'controller_layer' => 'controller',
23 | // 空控制器名
24 | 'empty_controller' => 'Error',
25 | // 是否使用控制器后缀
26 | 'controller_suffix' => false,
27 | // 默认的路由变量规则
28 | 'default_route_pattern' => '[\w\.]+',
29 | // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
30 | 'request_cache_key' => false,
31 | // 请求缓存有效期
32 | 'request_cache_expire' => null,
33 | // 全局请求缓存排除规则
34 | 'request_cache_except' => [],
35 | // 默认控制器名
36 | 'default_controller' => 'Index',
37 | // 默认操作名
38 | 'default_action' => 'index',
39 | // 操作方法后缀
40 | 'action_suffix' => '',
41 | // 默认JSONP格式返回的处理方法
42 | 'default_jsonp_handler' => 'jsonpReturn',
43 | // 默认JSONP处理方法
44 | 'var_jsonp_handler' => 'callback',
45 | ];
46 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | 'PHPSESSID',
9 | // SESSION_ID的提交变量,解决flash上传跨域
10 | 'var_session_id' => '',
11 | // 驱动方式 支持file cache
12 | 'type' => 'file',
13 | // 存储连接标识 当type使用cache的时候有效
14 | 'store' => null,
15 | // 过期时间
16 | 'expire' => 1440,
17 | // 前缀
18 | 'prefix' => '',
19 | ];
20 |
--------------------------------------------------------------------------------
/config/trace.php:
--------------------------------------------------------------------------------
1 | 'Html',
8 | // 读取的日志通道名
9 | 'channel' => '',
10 | ];
11 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | 'Think',
9 | // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
10 | 'auto_rule' => 1,
11 | // 模板目录名
12 | 'view_dir_name' => 'view',
13 | // 模板后缀
14 | 'view_suffix' => 'html',
15 | // 模板文件名分隔符
16 | 'view_depr' => DIRECTORY_SEPARATOR,
17 | // 模板引擎普通标签开始标记
18 | 'tpl_begin' => '{',
19 | // 模板引擎普通标签结束标记
20 | 'tpl_end' => '}',
21 | // 标签库标签开始标记
22 | 'taglib_begin' => '{',
23 | // 标签库标签结束标记
24 | 'taglib_end' => '}',
25 | ];
26 |
--------------------------------------------------------------------------------
/container.config.json:
--------------------------------------------------------------------------------
1 | {
2 | // 本配置文件仅配合模板部署使用,为模板部署的服务生成「服务设置」的初始值。
3 | // 模板部署结束后,后续服务发布与本配置文件完全无关,修改「服务设置」请到控制台操作。
4 | // 复制模板代码自行开发请忽略本配置文件。
5 |
6 | "containerPort": 80,
7 | "minNum": 0,
8 | "maxNum": 5,
9 | "cpu": 1,
10 | "mem": 2,
11 | "policyType": "cpu",
12 | "policyThreshold": 60,
13 | "policyDetails": [
14 | {
15 | "PolicyType": "cpu",
16 | "PolicyThreshold": 60
17 | },
18 | {
19 | "PolicyType": "mem",
20 | "PolicyThreshold": 60
21 | }
22 | ],
23 | "envParams": {},
24 | "customLogs": "/app/runtime/log/*",
25 | "dataBaseName":"thinkphp_demo",
26 | "executeSQLs":[
27 | "CREATE DATABASE IF NOT EXISTS thinkphp_demo;",
28 | "USE thinkphp_demo;",
29 | "CREATE TABLE IF NOT EXISTS `Counters` (`id` int(11) NOT NULL AUTO_INCREMENT, `count` int(11) NOT NULL DEFAULT 1, `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE = InnoDB DEFAULT CHARSET = utf8;"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 | #
2 | # Options +FollowSymlinks -Multiviews
3 | # RewriteEngine On
4 | #
5 | # RewriteCond %{REQUEST_FILENAME} !-d
6 | # RewriteCond %{REQUEST_FILENAME} !-f
7 | # RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8 | #
9 |
10 | RewriteEngine on
11 | RewriteCond %{REQUEST_FILENAME} !-d
12 | RewriteCond %{REQUEST_FILENAME} !-f
13 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
14 |
15 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeixinCloud/wxcloudrun-thinkphp-nginx/87591ad05727b179ec0bb5a8da20dc19eb718e54/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // [ 应用入口文件 ]
13 | namespace think;
14 |
15 | require __DIR__ . '/../vendor/autoload.php';
16 |
17 | // 执行HTTP应用并响应
18 | $http = (new App())->http;
19 |
20 | $response = $http->run();
21 |
22 | $response->send();
23 |
24 | $http->end($response);
25 |
--------------------------------------------------------------------------------
/public/router.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | // $Id$
12 |
13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
14 | return false;
15 | } else {
16 | $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
17 |
18 | require __DIR__ . "/index.php";
19 | }
20 |
--------------------------------------------------------------------------------
/route/app.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | use think\facade\Route;
12 |
13 | // 获取当前计数
14 | Route::get('/api/count', 'index/getCount');
15 |
16 | // 更新计数,自增或者清零
17 | Route::post('/api/count', 'index/updateCount');
18 |
--------------------------------------------------------------------------------
/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # 后台启动
4 | php-fpm -D
5 | # 关闭后台启动,hold住进程
6 | nginx -g 'daemon off;'
--------------------------------------------------------------------------------
/runtime/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/think:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | console->run();
--------------------------------------------------------------------------------
/vendor/autoload.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
10 | 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
11 | 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
12 | 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
13 | 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
14 | );
15 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/topthink/think-helper/src/helper.php',
10 | '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
11 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
12 | '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
13 | 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
14 | '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
15 | );
16 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_namespaces.php:
--------------------------------------------------------------------------------
1 | array($baseDir . '/extend'),
10 | );
11 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_psr4.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/topthink/think-trace/src'),
10 | 'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/framework/src/think'),
11 | 'app\\' => array($baseDir . '/app'),
12 | 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
13 | 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
14 | 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
15 | 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
16 | 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
17 | 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
18 | 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
19 | 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
20 | 'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
21 | 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
22 | );
23 |
--------------------------------------------------------------------------------
/vendor/composer/platform_check.php:
--------------------------------------------------------------------------------
1 | = 70200)) {
8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
9 | }
10 |
11 | if ($issues) {
12 | if (!headers_sent()) {
13 | header('HTTP/1.1 500 Internal Server Error');
14 | }
15 | if (!ini_get('display_errors')) {
16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 | } elseif (!headers_sent()) {
19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 | }
21 | }
22 | trigger_error(
23 | 'Composer detected issues in your platform: ' . implode(' ', $issues),
24 | E_USER_ERROR
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/.editorconfig:
--------------------------------------------------------------------------------
1 | ; top-most EditorConfig file
2 | root = true
3 |
4 | ; Unix-style newlines
5 | [*]
6 | end_of_line = LF
7 |
8 | [*.php]
9 | indent_style = space
10 | indent_size = 4
11 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/.gitignore:
--------------------------------------------------------------------------------
1 | coverage
2 | coverage.xml
3 | composer.lock
4 | vendor
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/.php_cs:
--------------------------------------------------------------------------------
1 | level(Symfony\CS\FixerInterface::PSR2_LEVEL)
5 | ->fixers(['-yoda_conditions', 'ordered_use', 'short_array_syntax'])
6 | ->finder(Symfony\CS\Finder\DefaultFinder::create()
7 | ->in(__DIR__.'/src/'));
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/.scrutinizer.yml:
--------------------------------------------------------------------------------
1 | filter:
2 | paths: [src/*]
3 | checks:
4 | php:
5 | code_rating: true
6 | remove_extra_empty_lines: true
7 | remove_php_closing_tag: true
8 | remove_trailing_whitespace: true
9 | fix_use_statements:
10 | remove_unused: true
11 | preserve_multiple: false
12 | preserve_blanklines: true
13 | order_alphabetically: true
14 | fix_php_opening_tag: true
15 | fix_linefeed: true
16 | fix_line_ending: true
17 | fix_identation_4spaces: true
18 | fix_doc_comments: true
19 | tools:
20 | external_code_coverage:
21 | timeout: 900
22 | runs: 6
23 | php_code_coverage: false
24 | php_code_sniffer:
25 | config:
26 | standard: PSR2
27 | filter:
28 | paths: ['src']
29 | php_loc:
30 | enabled: true
31 | excluded_dirs: [vendor, spec, stubs]
32 | php_cpd:
33 | enabled: true
34 | excluded_dirs: [vendor, spec, stubs]
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 5.5
5 | - 5.6
6 | - 7.0
7 | - 7.1
8 | - 7.2
9 |
10 | matrix:
11 | allow_failures:
12 | - php: 5.5
13 |
14 | env:
15 | - COMPOSER_OPTS=""
16 | - COMPOSER_OPTS="--prefer-lowest"
17 |
18 | install:
19 | - if [[ "${TRAVIS_PHP_VERSION}" == "5.5" ]]; then composer require phpunit/phpunit:^4.8.36 phpspec/phpspec:^2 --prefer-dist --update-with-dependencies; fi
20 | - if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then composer require phpunit/phpunit:^6.0 --prefer-dist --update-with-dependencies; fi
21 | - travis_retry composer update --prefer-dist $COMPOSER_OPTS
22 |
23 | script:
24 | - vendor/bin/phpspec run
25 | - vendor/bin/phpunit
26 |
27 | after_script:
28 | - wget https://scrutinizer-ci.com/ocular.phar'
29 | - php ocular.phar code-coverage:upload --format=php-clover ./clover/phpunit.xml'
30 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Frank de Jonge
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/league/flysystem-cached-adapter/clover/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "league/flysystem-cached-adapter",
3 | "description": "An adapter decorator to enable meta-data caching.",
4 | "autoload": {
5 | "psr-4": {
6 | "League\\Flysystem\\Cached\\": "src/"
7 | }
8 | },
9 | "require": {
10 | "league/flysystem": "~1.0",
11 | "psr/cache": "^1.0.0"
12 | },
13 | "require-dev": {
14 | "phpspec/phpspec": "^3.4",
15 | "phpunit/phpunit": "^5.7",
16 | "mockery/mockery": "~0.9",
17 | "predis/predis": "~1.0",
18 | "tedivm/stash": "~0.12"
19 | },
20 | "suggest": {
21 | "ext-phpredis": "Pure C implemented extension for PHP"
22 | },
23 | "license": "MIT",
24 | "authors": [
25 | {
26 | "name": "frankdejonge",
27 | "email": "info@frenky.net"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/phpspec.yml:
--------------------------------------------------------------------------------
1 | ---
2 | suites:
3 | cached_adapter_suite:
4 | namespace: League\Flysystem\Cached
5 | psr4_prefix: League\Flysystem\Cached
6 | formatter.name: pretty
7 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/phpunit.php:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 | ./tests/
17 |
18 |
19 |
20 |
21 | ./src/
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/readme.md:
--------------------------------------------------------------------------------
1 | # Flysystem Cached CachedAdapter
2 |
3 | [](https://twitter.com/frankdejonge)
4 | [](https://travis-ci.org/thephpleague/flysystem-cached-adapter)
5 | [](https://scrutinizer-ci.com/g/thephpleague/flysystem-cached-adapter/code-structure)
6 | [](https://scrutinizer-ci.com/g/thephpleague/flysystem-cached-adapter)
7 | [](LICENSE)
8 | [](https://packagist.org/packages/league/flysystem-cached-adapter)
9 | [](https://packagist.org/packages/league/flysystem-cached-adapter)
10 |
11 |
12 | The adapter decorator caches metadata and directory listings.
13 |
14 | ```bash
15 | composer require league/flysystem-cached-adapter
16 | ```
17 |
18 | ## Usage
19 |
20 | [Check out the docs.](https://flysystem.thephpleague.com/docs/advanced/caching/)
21 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/src/Storage/Memcached.php:
--------------------------------------------------------------------------------
1 | key = $key;
34 | $this->expire = $expire;
35 | $this->memcached = $memcached;
36 | }
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function load()
42 | {
43 | $contents = $this->memcached->get($this->key);
44 |
45 | if ($contents !== false) {
46 | $this->setFromStorage($contents);
47 | }
48 | }
49 |
50 | /**
51 | * {@inheritdoc}
52 | */
53 | public function save()
54 | {
55 | $contents = $this->getForStorage();
56 | $expiration = $this->expire === null ? 0 : time() + $this->expire;
57 | $this->memcached->set($this->key, $contents, $expiration);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/src/Storage/Memory.php:
--------------------------------------------------------------------------------
1 | client = $client ?: new Redis();
34 | $this->key = $key;
35 | $this->expire = $expire;
36 | }
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function load()
42 | {
43 | $contents = $this->client->get($this->key);
44 |
45 | if ($contents !== false) {
46 | $this->setFromStorage($contents);
47 | }
48 | }
49 |
50 | /**
51 | * {@inheritdoc}
52 | */
53 | public function save()
54 | {
55 | $contents = $this->getForStorage();
56 | $this->client->set($this->key, $contents);
57 |
58 | if ($this->expire !== null) {
59 | $this->client->expire($this->key, $this->expire);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/src/Storage/Psr6Cache.php:
--------------------------------------------------------------------------------
1 | pool = $pool;
34 | $this->key = $key;
35 | $this->expire = $expire;
36 | }
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function save()
42 | {
43 | $item = $this->pool->getItem($this->key);
44 | $item->set($this->getForStorage());
45 | $item->expiresAfter($this->expire);
46 | $this->pool->save($item);
47 | }
48 |
49 | /**
50 | * {@inheritdoc}
51 | */
52 | public function load()
53 | {
54 | $item = $this->pool->getItem($this->key);
55 | if ($item->isHit()) {
56 | $this->setFromStorage($item->get());
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/src/Storage/Stash.php:
--------------------------------------------------------------------------------
1 | key = $key;
34 | $this->expire = $expire;
35 | $this->pool = $pool;
36 | }
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function load()
42 | {
43 | $item = $this->pool->getItem($this->key);
44 | $contents = $item->get();
45 |
46 | if ($item->isMiss() === false) {
47 | $this->setFromStorage($contents);
48 | }
49 | }
50 |
51 | /**
52 | * {@inheritdoc}
53 | */
54 | public function save()
55 | {
56 | $contents = $this->getForStorage();
57 | $item = $this->pool->getItem($this->key);
58 | $item->set($contents, $this->expire);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/tests/InspectionTests.php:
--------------------------------------------------------------------------------
1 | shouldReceive('load')->once();
13 | $cached_adapter = new CachedAdapter($adapter, $cache);
14 | $this->assertInstanceOf('League\Flysystem\AdapterInterface', $cached_adapter->getAdapter());
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/tests/MemcachedTests.php:
--------------------------------------------------------------------------------
1 | shouldReceive('get')->once()->andReturn(false);
12 | $cache = new Memcached($client);
13 | $cache->load();
14 | $this->assertFalse($cache->isComplete('', false));
15 | }
16 |
17 | public function testLoadSuccess()
18 | {
19 | $response = json_encode([[], ['' => true]]);
20 | $client = Mockery::mock('Memcached');
21 | $client->shouldReceive('get')->once()->andReturn($response);
22 | $cache = new Memcached($client);
23 | $cache->load();
24 | $this->assertTrue($cache->isComplete('', false));
25 | }
26 |
27 | public function testSave()
28 | {
29 | $response = json_encode([[], []]);
30 | $client = Mockery::mock('Memcached');
31 | $client->shouldReceive('set')->once()->andReturn($response);
32 | $cache = new Memcached($client);
33 | $cache->save();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/tests/NoopCacheTests.php:
--------------------------------------------------------------------------------
1 | assertEquals($cache, $cache->storeMiss('file.txt'));
12 | $this->assertNull($cache->setComplete('', false));
13 | $this->assertNull($cache->load());
14 | $this->assertNull($cache->flush());
15 | $this->assertNull($cache->has('path.txt'));
16 | $this->assertNull($cache->autosave());
17 | $this->assertFalse($cache->isComplete('', false));
18 | $this->assertFalse($cache->read('something'));
19 | $this->assertFalse($cache->readStream('something'));
20 | $this->assertFalse($cache->getMetadata('something'));
21 | $this->assertFalse($cache->getMimetype('something'));
22 | $this->assertFalse($cache->getSize('something'));
23 | $this->assertFalse($cache->getTimestamp('something'));
24 | $this->assertFalse($cache->getVisibility('something'));
25 | $this->assertEmpty($cache->listContents('', false));
26 | $this->assertFalse($cache->rename('', ''));
27 | $this->assertFalse($cache->copy('', ''));
28 | $this->assertNull($cache->save());
29 | $object = ['path' => 'path.ext'];
30 | $this->assertEquals($object, $cache->updateObject('path.txt', $object));
31 | $this->assertEquals([['path' => 'some/file.txt']], $cache->storeContents('unknwon', [
32 | ['path' => 'some/file.txt'],
33 | ], false));
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/tests/PhpRedisTests.php:
--------------------------------------------------------------------------------
1 | shouldReceive('get')->with('flysystem')->once()->andReturn(false);
12 | $cache = new PhpRedis($client);
13 | $cache->load();
14 | $this->assertFalse($cache->isComplete('', false));
15 | }
16 |
17 | public function testLoadSuccess()
18 | {
19 | $response = json_encode([[], ['' => true]]);
20 | $client = Mockery::mock('Redis');
21 | $client->shouldReceive('get')->with('flysystem')->once()->andReturn($response);
22 | $cache = new PhpRedis($client);
23 | $cache->load();
24 | $this->assertTrue($cache->isComplete('', false));
25 | }
26 |
27 | public function testSave()
28 | {
29 | $data = json_encode([[], []]);
30 | $client = Mockery::mock('Redis');
31 | $client->shouldReceive('set')->with('flysystem', $data)->once();
32 | $cache = new PhpRedis($client);
33 | $cache->save();
34 | }
35 |
36 | public function testSaveWithExpire()
37 | {
38 | $data = json_encode([[], []]);
39 | $client = Mockery::mock('Redis');
40 | $client->shouldReceive('set')->with('flysystem', $data)->once();
41 | $client->shouldReceive('expire')->with('flysystem', 20)->once();
42 | $cache = new PhpRedis($client, 'flysystem', 20);
43 | $cache->save();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/league/flysystem-cached-adapter/tests/StashTest.php:
--------------------------------------------------------------------------------
1 | shouldReceive('get')->once()->andReturn(null);
13 | $item->shouldReceive('isMiss')->once()->andReturn(true);
14 | $pool->shouldReceive('getItem')->once()->andReturn($item);
15 | $cache = new Stash($pool);
16 | $cache->load();
17 | $this->assertFalse($cache->isComplete('', false));
18 | }
19 |
20 | public function testLoadSuccess()
21 | {
22 | $response = json_encode([[], ['' => true]]);
23 | $pool = Mockery::mock('Stash\Pool');
24 | $item = Mockery::mock('Stash\Item');
25 | $item->shouldReceive('get')->once()->andReturn($response);
26 | $item->shouldReceive('isMiss')->once()->andReturn(false);
27 | $pool->shouldReceive('getItem')->once()->andReturn($item);
28 | $cache = new Stash($pool);
29 | $cache->load();
30 | $this->assertTrue($cache->isComplete('', false));
31 | }
32 |
33 | public function testSave()
34 | {
35 | $response = json_encode([[], []]);
36 | $pool = Mockery::mock('Stash\Pool');
37 | $item = Mockery::mock('Stash\Item');
38 | $item->shouldReceive('set')->once()->andReturn($response);
39 | $pool->shouldReceive('getItem')->once()->andReturn($item);
40 | $cache = new Stash($pool);
41 | $cache->save();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2019 Frank de Jonge
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/league/flysystem/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | | Version | Supported |
6 | | ------- | ------------------ |
7 | | 1.0.x | :white_check_mark: |
8 | | 2.0.x | :x: |
9 |
10 | ## Reporting a Vulnerability
11 |
12 | When you've encountered a security vulnerability, please disclose it securely.
13 |
14 | The security process is described at:
15 | [https://flysystem.thephpleague.com/docs/security/](https://flysystem.thephpleague.com/docs/security/)
16 |
17 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/deprecations.md:
--------------------------------------------------------------------------------
1 | # Deprecations
2 |
3 | This document lists all the planned deprecations.
4 |
5 | ## Handlers will be removed in 2.0
6 |
7 | The `Handler` type and associated calls will be removed in version 2.0.
8 |
9 | ### Upgrade path
10 |
11 | You should create your own implementation for handling OOP usage,
12 | but it's recommended to move away from using an OOP-style wrapper entirely.
13 |
14 | The reason for this is that it's too easy for implementation details (for
15 | your application this is Flysystem) to leak into the application. The most
16 | important part for Flysystem is that it improves portability and creates a
17 | solid boundary between your application core and the infrastructure you use.
18 | The OOP-style handling breaks this principle, therefore I want to stop
19 | promoting it.
20 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Adapter/CanOverwriteFiles.php:
--------------------------------------------------------------------------------
1 | 'dir', 'path' => ''];
14 | }
15 | if (@ftp_chdir($this->getConnection(), $path) === true) {
16 | $this->setConnectionRoot();
17 |
18 | return ['type' => 'dir', 'path' => $path];
19 | }
20 |
21 | if ( ! ($object = ftp_raw($this->getConnection(), 'STAT ' . $path)) || count($object) < 3) {
22 | return false;
23 | }
24 |
25 | if (substr($object[1], 0, 5) === "ftpd:") {
26 | return false;
27 | }
28 |
29 | return $this->normalizeObject($object[1], '');
30 | }
31 |
32 | /**
33 | * @inheritdoc
34 | */
35 | protected function listDirectoryContents($directory, $recursive = true)
36 | {
37 | $listing = ftp_rawlist($this->getConnection(), $directory, $recursive);
38 |
39 | if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
40 | return [];
41 | }
42 |
43 | return $this->normalizeListing($listing, $directory);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php:
--------------------------------------------------------------------------------
1 | readStream($path);
20 |
21 | if ($response === false || ! is_resource($response['stream'])) {
22 | return false;
23 | }
24 |
25 | $result = $this->writeStream($newpath, $response['stream'], new Config());
26 |
27 | if ($result !== false && is_resource($response['stream'])) {
28 | fclose($response['stream']);
29 | }
30 |
31 | return $result !== false;
32 | }
33 |
34 | // Required abstract method
35 |
36 | /**
37 | * @param string $path
38 | *
39 | * @return resource
40 | */
41 | abstract public function readStream($path);
42 |
43 | /**
44 | * @param string $path
45 | * @param resource $resource
46 | * @param Config $config
47 | *
48 | * @return resource
49 | */
50 | abstract public function writeStream($path, $resource, Config $config);
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php:
--------------------------------------------------------------------------------
1 | read($path)) {
22 | return false;
23 | }
24 |
25 | $stream = fopen('php://temp', 'w+b');
26 | fwrite($stream, $data['contents']);
27 | rewind($stream);
28 | $data['stream'] = $stream;
29 | unset($data['contents']);
30 |
31 | return $data;
32 | }
33 |
34 | /**
35 | * Reads a file.
36 | *
37 | * @param string $path
38 | *
39 | * @return array|false
40 | *
41 | * @see League\Flysystem\ReadInterface::read()
42 | */
43 | abstract public function read($path);
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php:
--------------------------------------------------------------------------------
1 | config = $config ? Util::ensureConfig($config) : new Config;
23 | }
24 |
25 | /**
26 | * Get the Config.
27 | *
28 | * @return Config config object
29 | */
30 | public function getConfig()
31 | {
32 | return $this->config;
33 | }
34 |
35 | /**
36 | * Convert a config array to a Config object with the correct fallback.
37 | *
38 | * @param array $config
39 | *
40 | * @return Config
41 | */
42 | protected function prepareConfig(array $config)
43 | {
44 | $config = new Config($config);
45 | $config->setFallback($this->getConfig());
46 |
47 | return $config;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/ConnectionErrorException.php:
--------------------------------------------------------------------------------
1 | filesystem->deleteDir($this->path);
18 | }
19 |
20 | /**
21 | * List the directory contents.
22 | *
23 | * @param bool $recursive
24 | *
25 | * @return array|bool directory contents or false
26 | */
27 | public function getContents($recursive = false)
28 | {
29 | return $this->filesystem->listContents($this->path, $recursive);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Exception.php:
--------------------------------------------------------------------------------
1 | path = $path;
24 |
25 | parent::__construct('File already exists at path: ' . $this->getPath(), $code, $previous);
26 | }
27 |
28 | /**
29 | * Get the path which was found.
30 | *
31 | * @return string
32 | */
33 | public function getPath()
34 | {
35 | return $this->path;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/FileNotFoundException.php:
--------------------------------------------------------------------------------
1 | path = $path;
24 |
25 | parent::__construct('File not found at path: ' . $this->getPath(), $code, $previous);
26 | }
27 |
28 | /**
29 | * Get the path which was not found.
30 | *
31 | * @return string
32 | */
33 | public function getPath()
34 | {
35 | return $this->path;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/FilesystemException.php:
--------------------------------------------------------------------------------
1 | getPathname());
22 | }
23 |
24 | /**
25 | * Create a new exception for a link.
26 | *
27 | * @param string $systemType
28 | *
29 | * @return static
30 | */
31 | public static function forFtpSystemType($systemType)
32 | {
33 | $message = "The FTP system type '$systemType' is currently not supported.";
34 |
35 | return new static($message);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/AbstractPlugin.php:
--------------------------------------------------------------------------------
1 | filesystem = $filesystem;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/EmptyDir.php:
--------------------------------------------------------------------------------
1 | filesystem->listContents($dirname, false);
25 |
26 | foreach ($listing as $item) {
27 | if ($item['type'] === 'dir') {
28 | $this->filesystem->deleteDir($item['path']);
29 | } else {
30 | $this->filesystem->delete($item['path']);
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/ForcedCopy.php:
--------------------------------------------------------------------------------
1 | filesystem->delete($newpath);
33 | } catch (FileNotFoundException $e) {
34 | // The destination path does not exist. That's ok.
35 | $deleted = true;
36 | }
37 |
38 | if ($deleted) {
39 | return $this->filesystem->copy($path, $newpath);
40 | }
41 |
42 | return false;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/ForcedRename.php:
--------------------------------------------------------------------------------
1 | filesystem->delete($newpath);
33 | } catch (FileNotFoundException $e) {
34 | // The destination path does not exist. That's ok.
35 | $deleted = true;
36 | }
37 |
38 | if ($deleted) {
39 | return $this->filesystem->rename($path, $newpath);
40 | }
41 |
42 | return false;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/GetWithMetadata.php:
--------------------------------------------------------------------------------
1 | filesystem->getMetadata($path);
34 |
35 | if ( ! $object) {
36 | return false;
37 | }
38 |
39 | $keys = array_diff($metadata, array_keys($object));
40 |
41 | foreach ($keys as $key) {
42 | if ( ! method_exists($this->filesystem, $method = 'get' . ucfirst($key))) {
43 | throw new InvalidArgumentException('Could not fetch metadata: ' . $key);
44 | }
45 |
46 | $object[$key] = $this->filesystem->{$method}($path);
47 | }
48 |
49 | return $object;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/ListFiles.php:
--------------------------------------------------------------------------------
1 | filesystem->listContents($directory, $recursive);
28 |
29 | $filter = function ($object) {
30 | return $object['type'] === 'file';
31 | };
32 |
33 | return array_values(array_filter($contents, $filter));
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/ListPaths.php:
--------------------------------------------------------------------------------
1 | filesystem->listContents($directory, $recursive);
29 |
30 | foreach ($contents as $object) {
31 | $result[] = $object['path'];
32 | }
33 |
34 | return $result;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php:
--------------------------------------------------------------------------------
1 | hash = spl_object_hash($this);
20 | static::$safeStorage[$this->hash] = [];
21 | }
22 |
23 | public function storeSafely($key, $value)
24 | {
25 | static::$safeStorage[$this->hash][$key] = $value;
26 | }
27 |
28 | public function retrieveSafely($key)
29 | {
30 | if (array_key_exists($key, static::$safeStorage[$this->hash])) {
31 | return static::$safeStorage[$this->hash][$key];
32 | }
33 | }
34 |
35 | public function __destruct()
36 | {
37 | unset(static::$safeStorage[$this->hash]);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/UnreadableFileException.php:
--------------------------------------------------------------------------------
1 | getRealPath()
15 | )
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/league/flysystem/src/Util/StreamHasher.php:
--------------------------------------------------------------------------------
1 | algo = $algo;
20 | }
21 |
22 | /**
23 | * @param resource $resource
24 | *
25 | * @return string
26 | */
27 | public function hash($resource)
28 | {
29 | rewind($resource);
30 | $context = hash_init($this->algo);
31 | hash_update_stream($context, $resource);
32 | fclose($resource);
33 |
34 | return hash_final($context);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/psr/cache/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file, in reverse chronological order by release.
4 |
5 | ## 1.0.1 - 2016-08-06
6 |
7 | ### Fixed
8 |
9 | - Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
10 | - Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
11 | - Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
12 | - For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
13 |
14 | ## 1.0.0 - 2015-12-11
15 |
16 | Initial stable release; reflects accepted PSR-6 specification
17 |
--------------------------------------------------------------------------------
/vendor/psr/cache/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 PHP Framework Interoperability Group
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
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all 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/psr/cache/README.md:
--------------------------------------------------------------------------------
1 | PSR Cache
2 | =========
3 |
4 | This repository holds all interfaces defined by
5 | [PSR-6](http://www.php-fig.org/psr/psr-6/).
6 |
7 | Note that this is not a Cache implementation of its own. It is merely an
8 | interface that describes a Cache implementation. See the specification for more
9 | details.
10 |
--------------------------------------------------------------------------------
/vendor/psr/cache/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/cache",
3 | "description": "Common interface for caching libraries",
4 | "keywords": ["psr", "psr-6", "cache"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "PHP-FIG",
9 | "homepage": "http://www.php-fig.org/"
10 | }
11 | ],
12 | "require": {
13 | "php": ">=5.3.0"
14 | },
15 | "autoload": {
16 | "psr-4": {
17 | "Psr\\Cache\\": "src/"
18 | }
19 | },
20 | "extra": {
21 | "branch-alias": {
22 | "dev-master": "1.0.x-dev"
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/psr/cache/src/CacheException.php:
--------------------------------------------------------------------------------
1 | =7.2.0"
16 | },
17 | "autoload": {
18 | "psr-4": {
19 | "Psr\\Container\\": "src/"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/psr/container/src/ContainerExceptionInterface.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/NullLogger.php:
--------------------------------------------------------------------------------
1 | logger) { }`
11 | * blocks.
12 | */
13 | class NullLogger extends AbstractLogger
14 | {
15 | /**
16 | * Logs with an arbitrary level.
17 | *
18 | * @param mixed $level
19 | * @param string $message
20 | * @param array $context
21 | *
22 | * @return void
23 | *
24 | * @throws \Psr\Log\InvalidArgumentException
25 | */
26 | public function log($level, $message, array $context = array())
27 | {
28 | // noop
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/Test/DummyTest.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
34 | }
35 |
36 | public function doSomething()
37 | {
38 | if ($this->logger) {
39 | $this->logger->info('Doing work');
40 | }
41 |
42 | try {
43 | $this->doSomethingElse();
44 | } catch (Exception $exception) {
45 | $this->logger->error('Oh no!', array('exception' => $exception));
46 | }
47 |
48 | // do something useful
49 | }
50 | }
51 | ```
52 |
53 | You can then pick one of the implementations of the interface to get a logger.
54 |
55 | If you want to implement the interface, you can require this package and
56 | implement `Psr\Log\LoggerInterface` in your code. Please read the
57 | [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
58 | for details.
59 |
--------------------------------------------------------------------------------
/vendor/psr/log/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/log",
3 | "description": "Common interface for logging libraries",
4 | "keywords": ["psr", "psr-3", "log"],
5 | "homepage": "https://github.com/php-fig/log",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "PHP-FIG",
10 | "homepage": "https://www.php-fig.org/"
11 | }
12 | ],
13 | "require": {
14 | "php": ">=5.3.0"
15 | },
16 | "autoload": {
17 | "psr-4": {
18 | "Psr\\Log\\": "Psr/Log/"
19 | }
20 | },
21 | "extra": {
22 | "branch-alias": {
23 | "dev-master": "1.1.x-dev"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/simple-cache/.editorconfig:
--------------------------------------------------------------------------------
1 | ; This file is for unifying the coding style for different editors and IDEs.
2 | ; More information at http://editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | charset = utf-8
8 | indent_size = 4
9 | indent_style = space
10 | end_of_line = lf
11 | insert_final_newline = true
12 | trim_trailing_whitespace = true
13 |
--------------------------------------------------------------------------------
/vendor/psr/simple-cache/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License (MIT)
2 |
3 | Copyright (c) 2016 PHP Framework Interoperability Group
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
13 | > all 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
21 | > THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/psr/simple-cache/README.md:
--------------------------------------------------------------------------------
1 | PHP FIG Simple Cache PSR
2 | ========================
3 |
4 | This repository holds all interfaces related to PSR-16.
5 |
6 | Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details.
7 |
8 | You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package.
9 |
--------------------------------------------------------------------------------
/vendor/psr/simple-cache/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/simple-cache",
3 | "description": "Common interfaces for simple caching",
4 | "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "PHP-FIG",
9 | "homepage": "http://www.php-fig.org/"
10 | }
11 | ],
12 | "require": {
13 | "php": ">=5.3.0"
14 | },
15 | "autoload": {
16 | "psr-4": {
17 | "Psr\\SimpleCache\\": "src/"
18 | }
19 | },
20 | "extra": {
21 | "branch-alias": {
22 | "dev-master": "1.0.x-dev"
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/psr/simple-cache/src/CacheException.php:
--------------------------------------------------------------------------------
1 | 'think\\trace\\Service',
6 | );
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-mbstring",
3 | "type": "library",
4 | "description": "Symfony polyfill for the Mbstring extension",
5 | "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
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\\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/symfony/polyfill-php72/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-php72/README.md:
--------------------------------------------------------------------------------
1 | Symfony Polyfill / Php72
2 | ========================
3 |
4 | This component provides functions added to PHP 7.2 core:
5 |
6 | - [`spl_object_id`](https://php.net/spl_object_id)
7 | - [`stream_isatty`](https://php.net/stream_isatty)
8 |
9 | On Windows only:
10 |
11 | - [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support)
12 |
13 | Moved to core since 7.2 (was in the optional XML extension earlier):
14 |
15 | - [`utf8_encode`](https://php.net/utf8_encode)
16 | - [`utf8_decode`](https://php.net/utf8_decode)
17 |
18 | Also, it provides constants added to PHP 7.2:
19 | - [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig)
20 | - [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family)
21 |
22 | More information can be found in the
23 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
24 |
25 | License
26 | =======
27 |
28 | This library is released under the [MIT license](LICENSE).
29 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php72/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-php72",
3 | "type": "library",
4 | "description": "Symfony polyfill backporting some PHP 7.2+ 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\\Php72\\": "" },
23 | "files": [ "bootstrap.php" ]
24 | },
25 | "minimum-stability": "dev",
26 | "extra": {
27 | "branch-alias": {
28 | "dev-main": "1.23-dev"
29 | },
30 | "thanks": {
31 | "name": "symfony/polyfill",
32 | "url": "https://github.com/symfony/polyfill"
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php:
--------------------------------------------------------------------------------
1 | flags = $flags;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php:
--------------------------------------------------------------------------------
1 | =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 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/ConstStub.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\VarDumper\Caster;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Stub;
15 |
16 | /**
17 | * Represents a PHP constant and its value.
18 | *
19 | * @author Nicolas Grekas
20 | */
21 | class ConstStub extends Stub
22 | {
23 | public function __construct(string $name, $value = null)
24 | {
25 | $this->class = $name;
26 | $this->value = 1 < \func_num_args() ? $value : $name;
27 | }
28 |
29 | /**
30 | * @return string
31 | */
32 | public function __toString()
33 | {
34 | return (string) $this->value;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/CutArrayStub.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\VarDumper\Caster;
13 |
14 | /**
15 | * Represents a cut array.
16 | *
17 | * @author Nicolas Grekas
18 | */
19 | class CutArrayStub extends CutStub
20 | {
21 | public $preservedSubset;
22 |
23 | public function __construct(array $value, array $preservedKeys)
24 | {
25 | parent::__construct($value);
26 |
27 | $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys));
28 | $this->cut -= \count($this->preservedSubset);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/DsPairStub.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\VarDumper\Caster;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Stub;
15 |
16 | /**
17 | * @author Nicolas Grekas
18 | */
19 | class DsPairStub extends Stub
20 | {
21 | public function __construct($key, $value)
22 | {
23 | $this->value = [
24 | Caster::PREFIX_VIRTUAL.'key' => $key,
25 | Caster::PREFIX_VIRTUAL.'value' => $value,
26 | ];
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/EnumStub.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\VarDumper\Caster;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Stub;
15 |
16 | /**
17 | * Represents an enumeration of values.
18 | *
19 | * @author Nicolas Grekas
20 | */
21 | class EnumStub extends Stub
22 | {
23 | public $dumpKeys = true;
24 |
25 | public function __construct(array $values, bool $dumpKeys = true)
26 | {
27 | $this->value = $values;
28 | $this->dumpKeys = $dumpKeys;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/FrameStub.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\VarDumper\Caster;
13 |
14 | /**
15 | * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace().
16 | *
17 | * @author Nicolas Grekas
18 | */
19 | class FrameStub extends EnumStub
20 | {
21 | public $keepArgs;
22 | public $inTraceStub;
23 |
24 | public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false)
25 | {
26 | $this->value = $frame;
27 | $this->keepArgs = $keepArgs;
28 | $this->inTraceStub = $inTraceStub;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/GmpCaster.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\VarDumper\Caster;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Stub;
15 |
16 | /**
17 | * Casts GMP objects to array representation.
18 | *
19 | * @author Hamza Amrouche
20 | * @author Nicolas Grekas
21 | *
22 | * @final since Symfony 4.4
23 | */
24 | class GmpCaster
25 | {
26 | public static function castGmp(\GMP $gmp, array $a, Stub $stub, $isNested, $filter): array
27 | {
28 | $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp));
29 |
30 | return $a;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/ImagineCaster.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\VarDumper\Caster;
13 |
14 | use Imagine\Image\ImageInterface;
15 | use Symfony\Component\VarDumper\Cloner\Stub;
16 |
17 | /**
18 | * @author Grégoire Pineau
19 | */
20 | final class ImagineCaster
21 | {
22 | public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array
23 | {
24 | $imgData = $c->get('png');
25 | if (\strlen($imgData) > 1 * 1000 * 1000) {
26 | $a += [
27 | Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()),
28 | ];
29 | } else {
30 | $a += [
31 | Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()),
32 | ];
33 | }
34 |
35 | return $a;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/ImgStub.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\VarDumper\Caster;
13 |
14 | /**
15 | * @author Grégoire Pineau
16 | */
17 | class ImgStub extends ConstStub
18 | {
19 | public function __construct(string $data, string $contentType, string $size)
20 | {
21 | $this->value = '';
22 | $this->attr['img-data'] = $data;
23 | $this->attr['img-size'] = $size;
24 | $this->attr['content-type'] = $contentType;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.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\VarDumper\Caster;
13 |
14 | use ProxyManager\Proxy\ProxyInterface;
15 | use Symfony\Component\VarDumper\Cloner\Stub;
16 |
17 | /**
18 | * @author Nicolas Grekas
19 | *
20 | * @final since Symfony 4.4
21 | */
22 | class ProxyManagerCaster
23 | {
24 | public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested)
25 | {
26 | if ($parent = get_parent_class($c)) {
27 | $stub->class .= ' - '.$parent;
28 | }
29 | $stub->class .= '@proxy';
30 |
31 | return $a;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/TraceStub.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\VarDumper\Caster;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Stub;
15 |
16 | /**
17 | * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace().
18 | *
19 | * @author Nicolas Grekas
20 | */
21 | class TraceStub extends Stub
22 | {
23 | public $keepArgs;
24 | public $sliceOffset;
25 | public $sliceLength;
26 | public $numberingOffset;
27 |
28 | public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0)
29 | {
30 | $this->value = $trace;
31 | $this->keepArgs = $keepArgs;
32 | $this->sliceOffset = $sliceOffset;
33 | $this->sliceLength = $sliceLength;
34 | $this->numberingOffset = $numberingOffset;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Caster/UuidCaster.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\VarDumper\Caster;
13 |
14 | use Ramsey\Uuid\UuidInterface;
15 | use Symfony\Component\VarDumper\Cloner\Stub;
16 |
17 | /**
18 | * @author Grégoire Pineau
19 | */
20 | final class UuidCaster
21 | {
22 | public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array
23 | {
24 | $a += [
25 | Caster::PREFIX_VIRTUAL.'uuid' => (string) $c,
26 | ];
27 |
28 | return $a;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Cloner/ClonerInterface.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\VarDumper\Cloner;
13 |
14 | /**
15 | * @author Nicolas Grekas
16 | */
17 | interface ClonerInterface
18 | {
19 | /**
20 | * Clones a PHP variable.
21 | *
22 | * @param mixed $var Any PHP variable
23 | *
24 | * @return Data The cloned variable represented by a Data object
25 | */
26 | public function cloneVar($var);
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Cloner/Cursor.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\VarDumper\Cloner;
13 |
14 | /**
15 | * Represents the current state of a dumper while dumping.
16 | *
17 | * @author Nicolas Grekas
18 | */
19 | class Cursor
20 | {
21 | public const HASH_INDEXED = Stub::ARRAY_INDEXED;
22 | public const HASH_ASSOC = Stub::ARRAY_ASSOC;
23 | public const HASH_OBJECT = Stub::TYPE_OBJECT;
24 | public const HASH_RESOURCE = Stub::TYPE_RESOURCE;
25 |
26 | public $depth = 0;
27 | public $refIndex = 0;
28 | public $softRefTo = 0;
29 | public $softRefCount = 0;
30 | public $softRefHandle = 0;
31 | public $hardRefTo = 0;
32 | public $hardRefCount = 0;
33 | public $hardRefHandle = 0;
34 | public $hashType;
35 | public $hashKey;
36 | public $hashKeyIsBinary;
37 | public $hashIndex = 0;
38 | public $hashLength = 0;
39 | public $hashCut = 0;
40 | public $stop = false;
41 | public $attr = [];
42 | public $skipChildren = false;
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.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\VarDumper\Command\Descriptor;
13 |
14 | use Symfony\Component\Console\Output\OutputInterface;
15 | use Symfony\Component\VarDumper\Cloner\Data;
16 |
17 | /**
18 | * @author Maxime Steinhausser
19 | */
20 | interface DumpDescriptorInterface
21 | {
22 | public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void;
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.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\VarDumper\Dumper\ContextProvider;
13 |
14 | /**
15 | * Tries to provide context on CLI.
16 | *
17 | * @author Maxime Steinhausser
18 | */
19 | final class CliContextProvider implements ContextProviderInterface
20 | {
21 | public function getContext(): ?array
22 | {
23 | if ('cli' !== \PHP_SAPI) {
24 | return null;
25 | }
26 |
27 | return [
28 | 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []),
29 | 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']),
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.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\VarDumper\Dumper\ContextProvider;
13 |
14 | /**
15 | * Interface to provide contextual data about dump data clones sent to a server.
16 | *
17 | * @author Maxime Steinhausser
18 | */
19 | interface ContextProviderInterface
20 | {
21 | /**
22 | * @return array|null Context data or null if unable to provide any context
23 | */
24 | public function getContext(): ?array;
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.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\VarDumper\Dumper;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Data;
15 | use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface;
16 |
17 | /**
18 | * @author Kévin Thérage
19 | */
20 | class ContextualizedDumper implements DataDumperInterface
21 | {
22 | private $wrappedDumper;
23 | private $contextProviders;
24 |
25 | /**
26 | * @param ContextProviderInterface[] $contextProviders
27 | */
28 | public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders)
29 | {
30 | $this->wrappedDumper = $wrappedDumper;
31 | $this->contextProviders = $contextProviders;
32 | }
33 |
34 | public function dump(Data $data)
35 | {
36 | $context = [];
37 | foreach ($this->contextProviders as $contextProvider) {
38 | $context[\get_class($contextProvider)] = $contextProvider->getContext();
39 | }
40 |
41 | $this->wrappedDumper->dump($data->withContext($context));
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Dumper/DataDumperInterface.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\VarDumper\Dumper;
13 |
14 | use Symfony\Component\VarDumper\Cloner\Data;
15 |
16 | /**
17 | * DataDumperInterface for dumping Data objects.
18 | *
19 | * @author Nicolas Grekas
20 | */
21 | interface DataDumperInterface
22 | {
23 | public function dump(Data $data);
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Exception/ThrowingCasterException.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\VarDumper\Exception;
13 |
14 | /**
15 | * @author Nicolas Grekas
16 | */
17 | class ThrowingCasterException extends \Exception
18 | {
19 | /**
20 | * @param \Throwable $prev The exception thrown from the caster
21 | */
22 | public function __construct(\Throwable $prev)
23 | {
24 | parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014-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/var-dumper/README.md:
--------------------------------------------------------------------------------
1 | VarDumper Component
2 | ===================
3 |
4 | The VarDumper component provides mechanisms for walking through any arbitrary
5 | PHP variable. It provides a better `dump()` function that you can use instead
6 | of `var_dump()`.
7 |
8 | Resources
9 | ---------
10 |
11 | * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html)
12 | * [Contributing](https://symfony.com/doc/current/contributing/index.html)
13 | * [Report issues](https://github.com/symfony/symfony/issues) and
14 | [send Pull Requests](https://github.com/symfony/symfony/pulls)
15 | in the [main Symfony repository](https://github.com/symfony/symfony)
16 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Resources/functions/dump.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\Component\VarDumper\VarDumper;
13 |
14 | if (!function_exists('dump')) {
15 | /**
16 | * @author Nicolas Grekas
17 | */
18 | function dump($var, ...$moreVars)
19 | {
20 | VarDumper::dump($var);
21 |
22 | foreach ($moreVars as $v) {
23 | VarDumper::dump($v);
24 | }
25 |
26 | if (1 < func_num_args()) {
27 | return func_get_args();
28 | }
29 |
30 | return $var;
31 | }
32 | }
33 |
34 | if (!function_exists('dd')) {
35 | function dd(...$vars)
36 | {
37 | foreach ($vars as $v) {
38 | VarDumper::dump($v);
39 | }
40 |
41 | exit(1);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js:
--------------------------------------------------------------------------------
1 | document.addEventListener('DOMContentLoaded', function() {
2 | let prev = null;
3 | Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) {
4 | const dedupId = article.dataset.dedupId;
5 | if (dedupId === prev) {
6 | article.getElementsByTagName('header')[0].classList.add('hidden');
7 | }
8 | prev = dedupId;
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | composer.phar
3 | composer.lock
4 | .DS_Store
5 | Thumbs.db
6 | /.idea
7 | /.vscode
--------------------------------------------------------------------------------
/vendor/topthink/framework/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: xenial
2 | language: php
3 |
4 | matrix:
5 | fast_finish: true
6 | include:
7 | - php: 7.1
8 | - php: 7.2
9 | - php: 7.3
10 |
11 | cache:
12 | directories:
13 | - $HOME/.composer/cache
14 |
15 | services:
16 | - memcached
17 | - redis-server
18 | - mysql
19 |
20 | before_install:
21 | - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
22 | - echo 'xdebug.mode = coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
23 | - printf "\n" | pecl install -f redis
24 | - travis_retry composer self-update
25 | - mysql -e 'CREATE DATABASE test;'
26 |
27 | install:
28 | - travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest
29 |
30 | script:
31 | - vendor/bin/phpunit --coverage-clover build/logs/coverage.xml
32 |
33 | after_script:
34 | - travis_retry wget https://scrutinizer-ci.com/ocular.phar
35 | - php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.xml
36 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
3 | 版权所有Copyright © 2006-2019 by ThinkPHP (http://thinkphp.cn)
4 | All rights reserved。
5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
6 |
7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。
8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
9 | 允许代码修改,再作为开源或商业软件发布。需要满足
10 | 的条件:
11 | 1. 需要给代码的用户一份Apache Licence ;
12 | 2. 如果你修改了代码,需要在被修改的文件中说明;
13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规
15 | 定需要包含的说明;
16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文
17 | 件中需要带有本协议内容。你可以在Notice中增加自己的
18 | 许可,但不可以表现为对Apache Licence构成更改。
19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/framework",
3 | "description": "The ThinkPHP Framework.",
4 | "keywords": [
5 | "framework",
6 | "thinkphp",
7 | "ORM"
8 | ],
9 | "homepage": "http://thinkphp.cn/",
10 | "license": "Apache-2.0",
11 | "authors": [
12 | {
13 | "name": "liu21st",
14 | "email": "liu21st@gmail.com"
15 | },
16 | {
17 | "name": "yunwuxin",
18 | "email": "448901948@qq.com"
19 | }
20 | ],
21 | "require": {
22 | "php": ">=7.1.0",
23 | "ext-json": "*",
24 | "ext-mbstring": "*",
25 | "league/flysystem": "^1.0",
26 | "league/flysystem-cached-adapter": "^1.0",
27 | "psr/log": "~1.0",
28 | "psr/container": "~1.0",
29 | "psr/simple-cache": "^1.0",
30 | "topthink/think-orm": "^2.0",
31 | "topthink/think-helper": "^3.1.1"
32 | },
33 | "require-dev": {
34 | "mikey179/vfsstream": "^1.6",
35 | "mockery/mockery": "^1.2",
36 | "phpunit/phpunit": "^7.0"
37 | },
38 | "autoload": {
39 | "files": [],
40 | "psr-4": {
41 | "think\\": "src/think/"
42 | }
43 | },
44 | "autoload-dev": {
45 | "psr-4": {
46 | "think\\tests\\": "tests/"
47 | }
48 | },
49 | "minimum-stability": "dev",
50 | "prefer-stable": true,
51 | "config": {
52 | "sort-packages": true
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeixinCloud/wxcloudrun-thinkphp-nginx/87591ad05727b179ec0bb5a8da20dc19eb718e54/vendor/topthink/framework/logo.png
--------------------------------------------------------------------------------
/vendor/topthink/framework/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 | ./tests
18 |
19 |
20 |
21 |
22 | ./src/think
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2016 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.
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/bin/README.md:
--------------------------------------------------------------------------------
1 | console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。
2 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeixinCloud/wxcloudrun-thinkphp-nginx/87591ad05727b179ec0bb5a8da20dc19eb718e54/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/Version.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\console\command;
14 |
15 | use think\console\Command;
16 | use think\console\Input;
17 | use think\console\Output;
18 |
19 | class Version extends Command
20 | {
21 | protected function configure()
22 | {
23 | // 指令配置
24 | $this->setName('version')
25 | ->setDescription('show thinkphp framework version');
26 | }
27 |
28 | protected function execute(Input $input, Output $output)
29 | {
30 | $output->writeln('v' . $this->app->version());
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Event.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace think\console\command\make;
12 |
13 | use think\console\command\Make;
14 |
15 | class Event extends Make
16 | {
17 | protected $type = "Event";
18 |
19 | protected function configure()
20 | {
21 | parent::configure();
22 | $this->setName('make:event')
23 | ->setDescription('Create a new event class');
24 | }
25 |
26 | protected function getStub(): string
27 | {
28 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'event.stub';
29 | }
30 |
31 | protected function getNamespace(string $app): string
32 | {
33 | return parent::getNamespace($app) . '\\event';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Listener.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace think\console\command\make;
12 |
13 | use think\console\command\Make;
14 |
15 | class Listener extends Make
16 | {
17 | protected $type = "Listener";
18 |
19 | protected function configure()
20 | {
21 | parent::configure();
22 | $this->setName('make:listener')
23 | ->setDescription('Create a new listener class');
24 | }
25 |
26 | protected function getStub(): string
27 | {
28 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'listener.stub';
29 | }
30 |
31 | protected function getNamespace(string $app): string
32 | {
33 | return parent::getNamespace($app) . '\\listener';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Middleware.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\command\make;
13 |
14 | use think\console\command\Make;
15 |
16 | class Middleware extends Make
17 | {
18 | protected $type = "Middleware";
19 |
20 | protected function configure()
21 | {
22 | parent::configure();
23 | $this->setName('make:middleware')
24 | ->setDescription('Create a new middleware class');
25 | }
26 |
27 | protected function getStub(): string
28 | {
29 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'middleware.stub';
30 | }
31 |
32 | protected function getNamespace(string $app): string
33 | {
34 | return parent::getNamespace($app) . '\\middleware';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Model.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\command\make;
13 |
14 | use think\console\command\Make;
15 |
16 | class Model extends Make
17 | {
18 | protected $type = "Model";
19 |
20 | protected function configure()
21 | {
22 | parent::configure();
23 | $this->setName('make:model')
24 | ->setDescription('Create a new model class');
25 | }
26 |
27 | protected function getStub(): string
28 | {
29 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'model.stub';
30 | }
31 |
32 | protected function getNamespace(string $app): string
33 | {
34 | return parent::getNamespace($app) . '\\model';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Service.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\command\make;
13 |
14 | use think\console\command\Make;
15 |
16 | class Service extends Make
17 | {
18 | protected $type = "Service";
19 |
20 | protected function configure()
21 | {
22 | parent::configure();
23 | $this->setName('make:service')
24 | ->setDescription('Create a new Service class');
25 | }
26 |
27 | protected function getStub(): string
28 | {
29 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'service.stub';
30 | }
31 |
32 | protected function getNamespace(string $app): string
33 | {
34 | return parent::getNamespace($app) . '\\service';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Subscribe.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace think\console\command\make;
12 |
13 | use think\console\command\Make;
14 |
15 | class Subscribe extends Make
16 | {
17 | protected $type = "Subscribe";
18 |
19 | protected function configure()
20 | {
21 | parent::configure();
22 | $this->setName('make:subscribe')
23 | ->setDescription('Create a new subscribe class');
24 | }
25 |
26 | protected function getStub(): string
27 | {
28 | return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'subscribe.stub';
29 | }
30 |
31 | protected function getNamespace(string $app): string
32 | {
33 | return parent::getNamespace($app) . '\\subscribe';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/Validate.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\command\make;
13 |
14 | use think\console\command\Make;
15 |
16 | class Validate extends Make
17 | {
18 | protected $type = "Validate";
19 |
20 | protected function configure()
21 | {
22 | parent::configure();
23 | $this->setName('make:validate')
24 | ->setDescription('Create a validate class');
25 | }
26 |
27 | protected function getStub(): string
28 | {
29 | $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR;
30 |
31 | return $stubPath . 'validate.stub';
32 | }
33 |
34 | protected function getNamespace(string $app): string
35 | {
36 | return parent::getNamespace($app) . '\\validate';
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub:
--------------------------------------------------------------------------------
1 | setName('{%commandName%}')
18 | ->setDescription('the {%commandName%} command');
19 | }
20 |
21 | protected function execute(Input $input, Output $output)
22 | {
23 | // 指令输出
24 | $output->writeln('{%commandName%}');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/command/make/stubs/controller.api.stub:
--------------------------------------------------------------------------------
1 | ['规则1','规则2'...]
13 | *
14 | * @var array
15 | */
16 | protected $rule = [];
17 |
18 | /**
19 | * 定义错误信息
20 | * 格式:'字段名.规则名' => '错误信息'
21 | *
22 | * @var array
23 | */
24 | protected $message = [];
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/output/driver/Buffer.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\output\driver;
13 |
14 | use think\console\Output;
15 |
16 | class Buffer
17 | {
18 | /**
19 | * @var string
20 | */
21 | private $buffer = '';
22 |
23 | public function __construct(Output $output)
24 | {
25 | // do nothing
26 | }
27 |
28 | public function fetch()
29 | {
30 | $content = $this->buffer;
31 | $this->buffer = '';
32 | return $content;
33 | }
34 |
35 | public function write($messages, bool $newline = false, int $options = 0)
36 | {
37 | $messages = (array) $messages;
38 |
39 | foreach ($messages as $message) {
40 | $this->buffer .= $message;
41 | }
42 | if ($newline) {
43 | $this->buffer .= "\n";
44 | }
45 | }
46 |
47 | public function renderException(\Throwable $e)
48 | {
49 | // do nothing
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/console/output/driver/Nothing.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\console\output\driver;
13 |
14 | use think\console\Output;
15 |
16 | class Nothing
17 | {
18 |
19 | public function __construct(Output $output)
20 | {
21 | // do nothing
22 | }
23 |
24 | public function write($messages, bool $newline = false, int $options = 0)
25 | {
26 | // do nothing
27 | }
28 |
29 | public function renderException(\Throwable $e)
30 | {
31 | // do nothing
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\contract;
14 |
15 | /**
16 | * 日志驱动接口
17 | */
18 | interface LogHandlerInterface
19 | {
20 | /**
21 | * 日志写入接口
22 | * @access public
23 | * @param array $log 日志信息
24 | * @return bool
25 | */
26 | public function save(array $log): bool;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\contract;
14 |
15 | /**
16 | * Session驱动接口
17 | */
18 | interface SessionHandlerInterface
19 | {
20 | public function read(string $sessionId): string;
21 | public function delete(string $sessionId): bool;
22 | public function write(string $sessionId, string $data): bool;
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/AppInit.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\event;
14 |
15 | /**
16 | * AppInit事件类
17 | */
18 | class AppInit
19 | {}
20 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/HttpEnd.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\event;
14 |
15 | /**
16 | * HttpEnd事件类
17 | */
18 | class HttpEnd
19 | {}
20 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/HttpRun.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\event;
14 |
15 | /**
16 | * HttpRun事件类
17 | */
18 | class HttpRun
19 | {}
20 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/LogRecord.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace think\event;
12 |
13 | /**
14 | * LogRecord事件类
15 | */
16 | class LogRecord
17 | {
18 | /** @var string */
19 | public $type;
20 |
21 | /** @var string */
22 | public $message;
23 |
24 | public function __construct($type, $message)
25 | {
26 | $this->type = $type;
27 | $this->message = $message;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/LogWrite.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\event;
14 |
15 | /**
16 | * LogWrite事件类
17 | */
18 | class LogWrite
19 | {
20 | /** @var string */
21 | public $channel;
22 |
23 | /** @var array */
24 | public $log;
25 |
26 | public function __construct($channel, $log)
27 | {
28 | $this->channel = $channel;
29 | $this->log = $log;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/event/RouteLoaded.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\event;
14 |
15 | /**
16 | * 路由加载完成事件
17 | */
18 | class RouteLoaded
19 | {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\exception;
13 |
14 | use Psr\Container\NotFoundExceptionInterface;
15 | use RuntimeException;
16 | use Throwable;
17 |
18 | class ClassNotFoundException extends RuntimeException implements NotFoundExceptionInterface
19 | {
20 | protected $class;
21 |
22 | public function __construct(string $message, string $class = '', Throwable $previous = null)
23 | {
24 | $this->message = $message;
25 | $this->class = $class;
26 |
27 | parent::__construct($message, 0, $previous);
28 | }
29 |
30 | /**
31 | * 获取类名
32 | * @access public
33 | * @return string
34 | */
35 | public function getClass()
36 | {
37 | return $this->class;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/FileException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\exception;
14 |
15 | class FileException extends \RuntimeException
16 | {
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/FuncNotFoundException.php:
--------------------------------------------------------------------------------
1 | message = $message;
16 | $this->func = $func;
17 |
18 | parent::__construct($message, 0, $previous);
19 | }
20 |
21 | /**
22 | * 获取方法名
23 | * @access public
24 | * @return string
25 | */
26 | public function getFunc()
27 | {
28 | return $this->func;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/HttpException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\exception;
14 |
15 | use Exception;
16 |
17 | /**
18 | * HTTP异常
19 | */
20 | class HttpException extends \RuntimeException
21 | {
22 | private $statusCode;
23 | private $headers;
24 |
25 | public function __construct(int $statusCode, string $message = '', Exception $previous = null, array $headers = [], $code = 0)
26 | {
27 | $this->statusCode = $statusCode;
28 | $this->headers = $headers;
29 |
30 | parent::__construct($message, $code, $previous);
31 | }
32 |
33 | public function getStatusCode()
34 | {
35 | return $this->statusCode;
36 | }
37 |
38 | public function getHeaders()
39 | {
40 | return $this->headers;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/HttpResponseException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\exception;
14 |
15 | use think\Response;
16 |
17 | /**
18 | * HTTP响应异常
19 | */
20 | class HttpResponseException extends \RuntimeException
21 | {
22 | /**
23 | * @var Response
24 | */
25 | protected $response;
26 |
27 | public function __construct(Response $response)
28 | {
29 | $this->response = $response;
30 | }
31 |
32 | public function getResponse()
33 | {
34 | return $this->response;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 | namespace think\exception;
13 |
14 | use Psr\Cache\InvalidArgumentException as Psr6CacheInvalidArgumentInterface;
15 | use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInvalidArgumentInterface;
16 |
17 | /**
18 | * 非法数据异常
19 | */
20 | class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInvalidArgumentInterface, SimpleCacheInvalidArgumentInterface
21 | {
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\exception;
14 |
15 | /**
16 | * 路由未定义异常
17 | */
18 | class RouteNotFoundException extends HttpException
19 | {
20 |
21 | public function __construct()
22 | {
23 | parent::__construct(404, 'Route Not Found');
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/exception/ValidateException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\exception;
14 |
15 | /**
16 | * 数据验证异常
17 | */
18 | class ValidateException extends \RuntimeException
19 | {
20 | protected $error;
21 |
22 | public function __construct($error)
23 | {
24 | $this->error = $error;
25 | $this->message = is_array($error) ? implode(PHP_EOL, $error) : $error;
26 | }
27 |
28 | /**
29 | * 获取验证错误信息
30 | * @access public
31 | * @return array|string
32 | */
33 | public function getError()
34 | {
35 | return $this->error;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/facade/Config.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\facade;
14 |
15 | use think\Facade;
16 |
17 | /**
18 | * @see \think\Config
19 | * @package think\facade
20 | * @mixin \think\Config
21 | * @method static array load(string $file, string $name = '') 加载配置文件(多种格式)
22 | * @method static bool has(string $name) 检测配置是否存在
23 | * @method static mixed get(string $name = null, mixed $default = null) 获取配置参数 为空则获取所有配置
24 | * @method static array set(array $config, string $name = null) 设置配置参数 name为数组则为批量设置
25 | */
26 | class Config extends Facade
27 | {
28 | /**
29 | * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
30 | * @access protected
31 | * @return string
32 | */
33 | protected static function getFacadeClass()
34 | {
35 | return 'config';
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/facade/Cookie.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\facade;
14 |
15 | use think\Facade;
16 |
17 | /**
18 | * @see \think\Cookie
19 | * @package think\facade
20 | * @mixin \think\Cookie
21 | * @method static mixed get(mixed $name = '', string $default = null) 获取cookie
22 | * @method static bool has(string $name) 是否存在Cookie参数
23 | * @method static void set(string $name, string $value, mixed $option = null) Cookie 设置
24 | * @method static void forever(string $name, string $value = '', mixed $option = null) 永久保存Cookie数据
25 | * @method static void delete(string $name) Cookie删除
26 | * @method static array getCookie() 获取cookie保存数据
27 | * @method static void save() 保存Cookie
28 | */
29 | class Cookie extends Facade
30 | {
31 | /**
32 | * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
33 | * @access protected
34 | * @return string
35 | */
36 | protected static function getFacadeClass()
37 | {
38 | return 'cookie';
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/facade/Filesystem.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\facade;
14 |
15 | use think\Facade;
16 | use think\filesystem\Driver;
17 |
18 | /**
19 | * Class Filesystem
20 | * @package think\facade
21 | * @mixin \think\Filesystem
22 | * @method static Driver disk(string $name = null) ,null|string
23 | * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取缓存配置
24 | * @method static array getDiskConfig(string $disk, null $name = null, null $default = null) 获取磁盘配置
25 | * @method static string|null getDefaultDriver() 默认驱动
26 | */
27 | class Filesystem extends Facade
28 | {
29 | protected static function getFacadeClass()
30 | {
31 | return 'filesystem';
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/facade/Session.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\facade;
14 |
15 | use think\Facade;
16 |
17 | /**
18 | * @see \think\Session
19 | * @package think\facade
20 | * @mixin \think\Session
21 | * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取Session配置
22 | * @method static string|null getDefaultDriver() 默认驱动
23 | */
24 | class Session extends Facade
25 | {
26 | /**
27 | * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
28 | * @access protected
29 | * @return string
30 | */
31 | protected static function getFacadeClass()
32 | {
33 | return 'session';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/filesystem/driver/Local.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\filesystem\driver;
14 |
15 | use League\Flysystem\AdapterInterface;
16 | use League\Flysystem\Adapter\Local as LocalAdapter;
17 | use think\filesystem\Driver;
18 |
19 | class Local extends Driver
20 | {
21 | /**
22 | * 配置参数
23 | * @var array
24 | */
25 | protected $config = [
26 | 'root' => '',
27 | ];
28 |
29 | protected function createAdapter(): AdapterInterface
30 | {
31 | $permissions = $this->config['permissions'] ?? [];
32 |
33 | $links = ($this->config['links'] ?? null) === 'skip'
34 | ? LocalAdapter::SKIP_LINKS
35 | : LocalAdapter::DISALLOW_LINKS;
36 |
37 | return new LocalAdapter(
38 | $this->config['root'],
39 | LOCK_EX,
40 | $links,
41 | $permissions
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/initializer/BootService.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\initializer;
14 |
15 | use think\App;
16 |
17 | /**
18 | * 启动系统服务
19 | */
20 | class BootService
21 | {
22 | public function init(App $app)
23 | {
24 | $app->boot();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/initializer/RegisterService.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\initializer;
14 |
15 | use think\App;
16 | use think\service\ModelService;
17 | use think\service\PaginatorService;
18 | use think\service\ValidateService;
19 |
20 | /**
21 | * 注册系统服务
22 | */
23 | class RegisterService
24 | {
25 |
26 | protected $services = [
27 | PaginatorService::class,
28 | ValidateService::class,
29 | ModelService::class,
30 | ];
31 |
32 | public function init(App $app)
33 | {
34 | $file = $app->getRootPath() . 'vendor/services.php';
35 |
36 | $services = $this->services;
37 |
38 | if (is_file($file)) {
39 | $services = array_merge($services, include $file);
40 | }
41 |
42 | foreach ($services as $service) {
43 | if (class_exists($service)) {
44 | $app->register($service);
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/log/ChannelSet.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\log;
14 |
15 | use think\Log;
16 |
17 | /**
18 | * Class ChannelSet
19 | * @package think\log
20 | * @mixin Channel
21 | */
22 | class ChannelSet
23 | {
24 | protected $log;
25 | protected $channels;
26 |
27 | public function __construct(Log $log, array $channels)
28 | {
29 | $this->log = $log;
30 | $this->channels = $channels;
31 | }
32 |
33 | public function __call($method, $arguments)
34 | {
35 | foreach ($this->channels as $channel) {
36 | $this->log->channel($channel)->{$method}(...$arguments);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\middleware;
14 |
15 | use Closure;
16 | use think\exception\ValidateException;
17 | use think\Request;
18 | use think\Response;
19 |
20 | /**
21 | * 表单令牌支持
22 | */
23 | class FormTokenCheck
24 | {
25 |
26 | /**
27 | * 表单令牌检测
28 | * @access public
29 | * @param Request $request
30 | * @param Closure $next
31 | * @param string $token 表单令牌Token名称
32 | * @return Response
33 | */
34 | public function handle(Request $request, Closure $next, string $token = null)
35 | {
36 | $check = $request->checkToken($token ?: '__token__');
37 |
38 | if (false === $check) {
39 | throw new ValidateException('invalid token');
40 | }
41 |
42 | return $next($request);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/response/Html.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\response;
14 |
15 | use think\Cookie;
16 | use think\Response;
17 |
18 | /**
19 | * Html Response
20 | */
21 | class Html extends Response
22 | {
23 | /**
24 | * 输出type
25 | * @var string
26 | */
27 | protected $contentType = 'text/html';
28 |
29 | public function __construct(Cookie $cookie, $data = '', int $code = 200)
30 | {
31 | $this->init($data, $code);
32 | $this->cookie = $cookie;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/route/dispatch/Callback.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\route\dispatch;
14 |
15 | use think\route\Dispatch;
16 |
17 | /**
18 | * Callback Dispatcher
19 | */
20 | class Callback extends Dispatch
21 | {
22 | public function exec()
23 | {
24 | // 执行回调方法
25 | $vars = array_merge($this->request->param(), $this->param);
26 |
27 | return $this->app->invoke($this->dispatch, $vars);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/src/think/service/ValidateService.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\service;
14 |
15 | use think\Service;
16 | use think\Validate;
17 |
18 | /**
19 | * 验证服务类
20 | */
21 | class ValidateService extends Service
22 | {
23 | public function boot()
24 | {
25 | Validate::maker(function (Validate $validate) {
26 | $validate->setLang($this->app->lang);
27 | $validate->setDb($this->app->db);
28 | $validate->setRequest($this->app->request);
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/tests/ConfigTest.php:
--------------------------------------------------------------------------------
1 | setContent(" 'value1','key2'=>'value2'];");
15 | $root->addChild($file);
16 |
17 | $config = new Config();
18 |
19 | $config->load($file->url(), 'test');
20 |
21 | $this->assertEquals('value1', $config->get('test.key1'));
22 | $this->assertEquals('value2', $config->get('test.key2'));
23 |
24 | $this->assertSame(['key1' => 'value1', 'key2' => 'value2'], $config->get('test'));
25 | }
26 |
27 | public function testSetAndGet()
28 | {
29 | $config = new Config();
30 |
31 | $config->set([
32 | 'key1' => 'value1',
33 | 'key2' => [
34 | 'key3' => 'value3',
35 | ],
36 | ], 'test');
37 |
38 | $this->assertTrue($config->has('test.key1'));
39 | $this->assertEquals('value1', $config->get('test.key1'));
40 | $this->assertEquals('value3', $config->get('test.key2.key3'));
41 |
42 | $this->assertEquals(['key3' => 'value3'], $config->get('test.key2'));
43 | $this->assertFalse($config->has('test.key3'));
44 | $this->assertEquals('none', $config->get('test.key3', 'none'));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/tests/DbTest.php:
--------------------------------------------------------------------------------
1 | shouldReceive('get')->with('database.cache_store', null)->andReturn(null);
30 | $cache->shouldReceive('store')->with(null)->andReturn($store);
31 |
32 | $db = Db::__make($event, $config, $log, $cache);
33 |
34 | $config->shouldReceive('get')->with('database.foo', null)->andReturn('foo');
35 | $this->assertEquals('foo', $db->getConfig('foo'));
36 |
37 | $config->shouldReceive('get')->with('database', [])->andReturn([]);
38 | $this->assertEquals([], $db->getConfig());
39 |
40 | $callback = function () {
41 | };
42 | $event->shouldReceive('listen')->with('db.some', $callback);
43 | $db->event('some', $callback);
44 |
45 | $event->shouldReceive('trigger')->with('db.some', null, false);
46 | $db->trigger('some');
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/tests/InteractsWithApp.php:
--------------------------------------------------------------------------------
1 | app = m::mock(App::class)->makePartial();
22 | Container::setInstance($this->app);
23 | $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app);
24 | $this->app->shouldReceive('isDebug')->andReturnTrue();
25 | $this->config = m::mock(Config::class)->makePartial();
26 | $this->config->shouldReceive('get')->with('app.show_error_msg')->andReturnTrue();
27 | $this->app->shouldReceive('get')->with('config')->andReturn($this->config);
28 | $this->app->shouldReceive('runningInConsole')->andReturn(false);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/topthink/framework/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | 以下类库都在`\\think\\helper`命名空间下
6 |
7 | ## Str
8 |
9 | > 字符串操作
10 |
11 | ```
12 | // 检查字符串中是否包含某些字符串
13 | Str::contains($haystack, $needles)
14 |
15 | // 检查字符串是否以某些字符串结尾
16 | Str::endsWith($haystack, $needles)
17 |
18 | // 获取指定长度的随机字母数字组合的字符串
19 | Str::random($length = 16)
20 |
21 | // 字符串转小写
22 | Str::lower($value)
23 |
24 | // 字符串转大写
25 | Str::upper($value)
26 |
27 | // 获取字符串的长度
28 | Str::length($value)
29 |
30 | // 截取字符串
31 | Str::substr($string, $start, $length = null)
32 |
33 | ```
--------------------------------------------------------------------------------
/vendor/topthink/think-helper/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/think-helper",
3 | "description": "The ThinkPHP6 Helper Package",
4 | "license": "Apache-2.0",
5 | "authors": [
6 | {
7 | "name": "yunwuxin",
8 | "email": "448901948@qq.com"
9 | }
10 | ],
11 | "require": {
12 | "php": ">=7.1.0"
13 | },
14 | "autoload": {
15 | "psr-4": {
16 | "think\\": "src"
17 | },
18 | "files": [
19 | "src/helper.php"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/topthink/think-helper/src/contract/Arrayable.php:
--------------------------------------------------------------------------------
1 | =7.1.0",
17 | "ext-json": "*",
18 | "ext-pdo": "*",
19 | "psr/simple-cache": "^1.0",
20 | "psr/log": "~1.0",
21 | "topthink/think-helper":"^3.1"
22 | },
23 | "require-dev": {
24 | "phpunit/phpunit": "^7|^8|^9.5"
25 | },
26 | "autoload": {
27 | "psr-4": {
28 | "think\\": "src"
29 | },
30 | "files": [
31 | "stubs/load_stubs.php"
32 | ]
33 | },
34 | "autoload-dev": {
35 | "psr-4": {
36 | "tests\\": "tests"
37 | }
38 | },
39 | "config": {
40 | "sort-packages": true
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/BindParamException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\db\exception;
14 |
15 | /**
16 | * PDO参数绑定异常
17 | */
18 | class BindParamException extends DbException
19 | {
20 |
21 | /**
22 | * BindParamException constructor.
23 | * @access public
24 | * @param string $message
25 | * @param array $config
26 | * @param string $sql
27 | * @param array $bind
28 | * @param int $code
29 | */
30 | public function __construct(string $message, array $config, string $sql, array $bind, int $code = 10502)
31 | {
32 | $this->setData('Bind Param', $bind);
33 | parent::__construct($message, $config, $sql, $code);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/DataNotFoundException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\db\exception;
14 |
15 | class DataNotFoundException extends DbException
16 | {
17 | protected $table;
18 |
19 | /**
20 | * DbException constructor.
21 | * @access public
22 | * @param string $message
23 | * @param string $table
24 | * @param array $config
25 | */
26 | public function __construct(string $message, string $table = '', array $config = [])
27 | {
28 | $this->message = $message;
29 | $this->table = $table;
30 |
31 | $this->setData('Database Config', $config);
32 | }
33 |
34 | /**
35 | * 获取数据表名
36 | * @access public
37 | * @return string
38 | */
39 | public function getTable()
40 | {
41 | return $this->table;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/DbEventException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\db\exception;
13 |
14 | /**
15 | * Db事件异常
16 | */
17 | class DbEventException extends DbException
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/DbException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\db\exception;
14 |
15 | use think\Exception;
16 |
17 | /**
18 | * Database相关异常处理类
19 | */
20 | class DbException extends Exception
21 | {
22 | /**
23 | * DbException constructor.
24 | * @access public
25 | * @param string $message
26 | * @param array $config
27 | * @param string $sql
28 | * @param int $code
29 | */
30 | public function __construct(string $message, array $config = [], string $sql = '', int $code = 10500)
31 | {
32 | $this->message = $message;
33 | $this->code = $code;
34 |
35 | $this->setData('Database Status', [
36 | 'Error Code' => $code,
37 | 'Error Message' => $message,
38 | 'Error SQL' => $sql,
39 | ]);
40 |
41 | unset($config['username'], $config['password']);
42 | $this->setData('Database Config', $config);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 | namespace think\db\exception;
13 |
14 | use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInvalidArgumentInterface;
15 |
16 | /**
17 | * 非法数据异常
18 | */
19 | class InvalidArgumentException extends \InvalidArgumentException implements SimpleCacheInvalidArgumentInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/ModelEventException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\db\exception;
13 |
14 | /**
15 | * 模型事件异常
16 | */
17 | class ModelEventException extends DbException
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/db/exception/ModelNotFoundException.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\db\exception;
14 |
15 | class ModelNotFoundException extends DbException
16 | {
17 | protected $model;
18 |
19 | /**
20 | * 构造方法
21 | * @access public
22 | * @param string $message
23 | * @param string $model
24 | * @param array $config
25 | */
26 | public function __construct(string $message, string $model = '', array $config = [])
27 | {
28 | $this->message = $message;
29 | $this->model = $model;
30 |
31 | $this->setData('Database Config', $config);
32 | }
33 |
34 | /**
35 | * 获取模型类名
36 | * @access public
37 | * @return string
38 | */
39 | public function getModel()
40 | {
41 | return $this->model;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/facade/Db.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace think\facade;
13 |
14 | use think\Facade;
15 |
16 | /**
17 | * @see \think\DbManager
18 | * @mixin \think\DbManager
19 | */
20 | class Db extends Facade
21 | {
22 | /**
23 | * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
24 | * @access protected
25 | * @return string
26 | */
27 | protected static function getFacadeClass()
28 | {
29 | return 'think\DbManager';
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/src/model/Pivot.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | declare (strict_types = 1);
12 |
13 | namespace think\model;
14 |
15 | use think\Model;
16 |
17 | /**
18 | * 多对多中间表模型类
19 | */
20 | class Pivot extends Model
21 | {
22 |
23 | /**
24 | * 父模型
25 | * @var Model
26 | */
27 | public $parent;
28 |
29 | /**
30 | * 是否时间自动写入
31 | * @var bool
32 | */
33 | protected $autoWriteTimestamp = false;
34 |
35 | /**
36 | * 架构函数
37 | * @access public
38 | * @param array $data 数据
39 | * @param Model $parent 上级模型
40 | * @param string $table 中间数据表名
41 | */
42 | public function __construct(array $data = [], Model $parent = null, string $table = '')
43 | {
44 | $this->parent = $parent;
45 |
46 | if (is_null($this->name)) {
47 | $this->name = $table;
48 | }
49 |
50 | parent::__construct($data);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/topthink/think-orm/stubs/load_stubs.php:
--------------------------------------------------------------------------------
1 | =7.1.0",
13 | "topthink/framework": "^6.0.0"
14 | },
15 | "autoload": {
16 | "psr-4": {
17 | "think\\trace\\": "src"
18 | }
19 | },
20 | "extra": {
21 | "think":{
22 | "services":[
23 | "think\\trace\\Service"
24 | ],
25 | "config":{
26 | "trace": "src/config.php"
27 | }
28 | }
29 | },
30 | "minimum-stability": "dev"
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/topthink/think-trace/src/Service.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace think\trace;
12 |
13 | use think\Service as BaseService;
14 |
15 | class Service extends BaseService
16 | {
17 | public function register()
18 | {
19 | $this->app->middleware->add(TraceDebug::class);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/topthink/think-trace/src/config.php:
--------------------------------------------------------------------------------
1 | 'Html',
8 | // 读取的日志通道名
9 | 'channel' => '',
10 | ];
11 |
--------------------------------------------------------------------------------