Download the PHP package youzanyun/yz-cloud-boot without Composer
On this page you can find all versions of the php package youzanyun/yz-cloud-boot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download youzanyun/yz-cloud-boot
More information about youzanyun/yz-cloud-boot
Files in youzanyun/yz-cloud-boot
Download youzanyun/yz-cloud-boot
More information about youzanyun/yz-cloud-boot
Files in youzanyun/yz-cloud-boot
Vendor youzanyun
Package yz-cloud-boot
Short Description Bootstrap for YZCloud PHP Application
License MIT
Package yz-cloud-boot
Short Description Bootstrap for YZCloud PHP Application
License MIT
Please rate this library. Is it a good library?
Informations about the package yz-cloud-boot
YZCloudBoot
Bootstrap for YZCloud PHP Application
Based on Slim Framework: http://www.slimframework.com/
安装
使用
目录结构
一个标准的基于 YZCloudBoot 的应用程序应该基本上是这样的结构
Facade
实现了类似于 Laravel 的 Facade 特性,提供了可以迅速访问组件的绝大多数组件的静态代理
具体的命名空间位于 \YouzanCloudBoot\Facades
中
目前包括:
SlimFramework 原生
静态代理 | 被代理对象 |
---|---|
\YouzanCloudBoot\Facades\AppFacade | \Slim\App 的实例 $app 对象 |
\YouzanCloudBoot\Facades\DIFacade | $app->getContainer() |
\YouzanCloudBoot\Facades\RouteFacade | \Slim\App 的实例 $app 对象 (这是 \YouzanCloudBoot\Facades\AppFacade 的别名) |
\YouzanCloudBoot\Facades\RequestFacade | $app->getContainer()->get('request') |
\YouzanCloudBoot\Facades\ResponseFacade | $app->getContainer()->get('response') |
\YouzanCloudBoot\Facades\LogFacade | $app->getContainer()->get('logger') |
有赞云框架专属
静态代理 | 被代理对象 |
---|---|
\YouzanCloudBoot\Facades\BepRegFacade | $app->getContainer()->get('bepRegistry') |
\YouzanCloudBoot\Facades\MepRegFacade | $app->getContainer()->get('mepRegistry') |
\YouzanCloudBoot\Facades\EnvFacade | $app->getContainer()->get('envUtil') |
\YouzanCloudBoot\Facades\HttpFacade | $app->getContainer()->get('httpClient') |
\YouzanCloudBoot\Facades\DBFacade | $app->getContainer()->get('yzcMySQL') |
\YouzanCloudBoot\Facades\PDOFactoryFacade | $app->getContainer()->get('pdoFactory') |
\YouzanCloudBoot\Facades\RedisFacade | $app->getContainer()->get('yzcRedis') |
\YouzanCloudBoot\Facades\RedisFactoryFacade | $app->getContainer()->get('redisFactory') |
\YouzanCloudBoot\Facades\TokenFacade | $app->getContainer()->get('tokenUtil') |
\YouzanCloudBoot\Facades\ViewFacade | $app->getContainer()->get('view') |
具体的类参考,可以参见每个类头部的 PHP Doc,在 PHPStorm 等 IDE 内可以识别 @method 并提供语法提示
依赖注入容器和默认组件
依赖注入使用了 SlimFramework 默认内建的 Pimple: https://pimple.symfony.com/
默认包含了所有 SlimFramework 的组件,可以参考: http://www.slimframework.com/docs/v3/concepts/di.html 的 Required services 章节
以下是我们这个框架中封装的组件:
All versions of yz-cloud-boot with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1.0
ext-pdo Version *
ext-json Version *
ext-curl Version *
ext-redis Version *
slim/slim Version ^3.0
psr/container Version 1.0.0
monolog/monolog Version ^1.24
slim/twig-view Version ^2.5
symfony/yaml Version ^4.3
workerman/workerman Version ^3.5
youzanyun/open-sdk Version >=2.0.8
ext-pdo Version *
ext-json Version *
ext-curl Version *
ext-redis Version *
slim/slim Version ^3.0
psr/container Version 1.0.0
monolog/monolog Version ^1.24
slim/twig-view Version ^2.5
symfony/yaml Version ^4.3
workerman/workerman Version ^3.5
youzanyun/open-sdk Version >=2.0.8
The package youzanyun/yz-cloud-boot contains the following files
Loading the files please wait ....