Download the PHP package leocavalcante/siler without Composer
On this page you can find all versions of the php package leocavalcante/siler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leocavalcante/siler
More information about leocavalcante/siler
Files in leocavalcante/siler
Package siler
Short Description Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP.
License MIT
Informations about the package siler
⚠️ I'm afraid that I'm not being able to keep Siler up-to-date as it deserves, so it's repository has been archived.
As an alternative for Siler, something lightweight and simple that works as a library with Swoole out-of-the-box, I highly recommend Nano! Check it out: https://nano.hyperf.wiki/#/en/
Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP.
- 💧 Files and functions as first-class citizens
- 🔋 Zero dependency, everything is on top of PHP built-in functions
- ⚡ Blazing fast, no additional overhead - benchmark 1, benchmark 2 and benchmark 3
Use with Swoole
Flat files and plain-old PHP functions rocking on a production-grade, high-performance, scalable, concurrent and non-blocking HTTP server.
Getting started
Installation
That is it. Actually, Siler is a library, not a framework (maybe a micro-framework), the overall program flow of control is dictated by you. So, no hidden configs or predefined directory structures.
Hello, World!
Nothing more, nothing less. You don't need even tell Siler to run
or something like that (puts
works like a lazily evaluated echo
).
JSON
The Response\json
function will automatically add Content-type: application/json
in the response headers.
Swoole
Siler provides first-class support for Swoole. You can regularly use Route
, Request
and Response
modules for a Swoole HTTP server.
GraphQL
Install peer-dependency:
Schema-first
Code-first
Another peer-dependency:
Then:
Object type name will be guessed from class name, same for field name, and it's return type (i.e.: PHP string
scalar ===
GraphQL String
scalar).
What is next?
License
- MIT license
- Copyright 2020 © LC