Download the PHP package xiangyu2038/flysky without Composer

On this page you can find all versions of the php package xiangyu2038/flysky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flysky

flysky 一个使用IOC容器设计思想的PHP框架

为了使本框架尽可能简洁,框架本身仅仅只提供IOC容器($container) HTTP请求模块($request) 路由分发模块($routes) 事件($dispatcher) ,其他例如数据库查询,视图模板等可以使用其他框架的优秀模块.例如database使用laravel的Eloquent ORM,view使用laravel的blade模板引擎.本框架兼容laravel的各个模块,只需要用composer安装对应模块,然后在配置文件中添加服务提供者即可.

安装

目录结构

初始的目录结构如下:

 www  WEB部署目录(或者子目录)
 ├─app          应用目录
 │  ├─Config             配置文件目录
 │  ├─Events             事件目录
 │  ├─Exceptions          异常处理目录
 │  ├─Http                请求目录 (控制器目录)
 │  ├─Listeners            事件监听者目录
 │  ├─Models              模型目录
 │  ├─Providers             服务提供者目录
 │  ├─Routes             路由目录
 │  ├─Storage             存储目录(视图缓存 日志等)
 │  ├─View               视图目录
 ├─public                 WEB目录(对外访问目录)
 ├─vendor              composer 目录

配置

配置文件在app/Config目录下 配置文件示例

获取配置文件代码如下

其中config 为配置文件名称,test为配置文件的键

路由

路由配置文件在app/Routes目录下 示例代码如下

控制器

控制器在app/Http目录下 示例代码如下

$request 为当前请求对象

事件

框架的事件采用的是laravel的事件模块,所以和laravel的使用方法一致 事件目录在app/Events
事件编写示例

创建监听者 目录在app/Listeners 示例

创建完事件和监听者后 需要在事件提供者中配置事件和对应的监听者 示例

框架本身已定义好四种事件 分别是kernel.request,kernel.finish_request,kernel.exception,kernel.view四个事件,您可以根据自己的需求改写这些事件

异常处理

当程序发生异常时,会触发kernel.exception事件,最终会把异常抛给Exception进行处理,用户可以根据自己抛出异常的类型进行相应的处理 示例

服务提供者

集成第三方服务(尤其是laravel的服务) 可以使用服务提供者 目录在app/Config/provider 示例

数据库查询

本框架没有集成数据库查询功能,用户可以根据个人喜好选择第三方用的顺手的数据库查询功能 本示例将演示如何安装laravel的Eloquent ORM模型进行查询 首先 安装Eloquent ORM模块

增加服务提供者 在服务提供者种增加配置

增加对应的数据库配置文件 database.php 此配置文件直接从laravel中复制过来即可

大功告成 现在可以使用laravel的ORM了

视图

同样没有集成视图 本示例将演示如何安装laravel的blade模板引擎. 安装

增加服务提供者 在服务提供者种增加配置

增加对应的数据库配置文件 view.php 此配置文件直接从laravel中复制过来即可

大功告成 现在可以使用laravel的blade模板引擎了

我的github地址 .


All versions of flysky with dependencies

PHP Build Version
Package Version
Requires illuminate/view Version ^5.8
illuminate/database Version ^5.8
xiangyu2038/fly_sky_framework Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xiangyu2038/flysky contains the following files

Loading the files please wait ....