Download the PHP package waiterphp/core without Composer

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

waiterphp 核心类库

该项目提供了php的一些基础操作封装。可直接采用composer装载该类。

以下是类库的相关功能介绍。

装载配置

可通过以下方式获取配置文件中的数据。

函数可以从basePaths设置的多个路径里面,加载fileNames里面设置的多个文件中的内容,覆盖顺序为后者覆盖前者。

设置当前环境

通过以下函数设置环境变量和获取环境变量:

可采用dot方式,如下两种写法作用相同:

也可以直接写入数组:

注意:

重复设置的环境变量,后者会覆盖前者 环境变量有一些默认键名,如database为数据库设置,cache为缓存设置,函数会检测该键名,并自动初始化到相关类库

访问数据库

访问缓存

页面渲染工具

第三个参数可以选择你采用的渲染引擎,默认为smarty。 目前可支持的有:smarty、twig

可以设置自定义的第三个参数,要求类本身实现render方法。如下:

页面渲染需在您自己的项目composer.json中加入相关类库,

dao的使用

过滤器的使用

可以利用trait快速构建一个过滤器

当然,你也可以直接使用Filter直接过滤数据

注意:

第二个参数为默认值。如果没有设置,当获取不到数据时,抛出异常!

异常检测

用法如下:

事件绑定和触发

构建工具

http请求

curl请求

文件操作


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.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 waiterphp/core contains the following files

Loading the files please wait ....