Download the PHP package kicoephp/src without Composer

On this page you can find all versions of the php package kicoephp/src. 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 src

kicoephp

一个非常简单小巧 (仅由9个类组成) 的 php web 框架.

Install

Dash

nginx 配置:

Route

新版本框架源于自己一次写的快速路由前缀树实现, 总之就是非常快!:zap:swoole版本

上面的 route 定义将被解析成以下结构:

Routing

自定义基础类型

在路由参数映射到控制器方法参数时,将会自动将 string 转换成定义的类型,同时允许自定义:

Request

在定义控制器方法参数类型为 Request 时,系统将会自动构造实例注入

Response

同上,系统也将自动构造注入 Response 类:

自定义请求与返回类

继承系统 Request 和 Response 类中定义的所有公共属性将自动解析成相应实现

类似于 java 开发中的 DTOVO

DB

使用 DB 前必须在 config 中配置 mysql

\kicoe\core\DB::table('xx') 返回的是一个 Model 对象,该对象可以通过静态/非静态的方式调用下列方法,并返回自身对象或查询结果。

Select

查询结果都为单个 Model 对象或 Model 对象的数组。

Insert

Update

Delete

Transaction

Model

继承了 Model 的类用法和以上 DB::table('_table_name') 一样,并且会自动将其中定义所有的 public 属性作为查询字段。

增删改等操作也等同于 DB::table('table_name'),但要注意对象的 save()

以上代码执行 sql 过多是一个问题,还有就是框架中用来判断 Model 是否更新的原字段信息存在一个不是用构造函数初始化的属性中(所谓延迟),单纯的 PDO::fetchAll() 无法初始化这个属性,导致更新 sql 语句里会带上所有不为 uninitialized 的字段。

虽然可能是设计缺陷,最好还是转成以下更常规的更新方式:

当然不是数组的查询结果完全没问题:


更多用法可以参照 blog


All versions of src with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
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 kicoephp/src contains the following files

Loading the files please wait ....