ExEngine is an ultra lightweight micro-services framework for PHP 5.6+

Overview

ExEngine is an ultra lightweight micro-services framework for PHP 5.6+.

Documentation

Checkout the Wiki.

Examples

Click here to browse examples, also you can clone this repo and run them.

Quick start

  1. Install using composer or download a release.

    composer require linkfast/exengine
    
  2. Create an instance launcher

    Create an index.php file in the root of the folder exposed to the HTTP server, and include there vendor.php if using composer or the exengine.php file.

    
        include_once 'exengine.php';
        // or
        include_once 'vendor/autoload.php';
    
        new \ExEngine\CoreX(__DIR__);

    You can create a custom config class with settings.

  3. Create a folder called App relative to index.php. Inside of this new folder, create a file called Test.php with the following contents:

    Hello World

    "; } }">
    
       # File ´._/Test.php´
        class Test {
            function helloworld() {
                return "

    Hello World

    "
    ; } }
  4. Open your browser and navigate to: http://myserverhost/index.php/Test/helloworld

  5. Take a look to the Examples folder, profit.

Creating a REST controller

ExEngine allows easy REST controllers creation, you just have to extend a parent class and write the HTTP methods responses.


    class RestExample extends \ExEngine\RestController {
        function get($id) {
            return "Hello $id";
        }

        function post() {
            $data = $_POST['data'];
            return "Data: $data";
        }
        // function put()
        // function delete()
        // function options()
        // etc.
    }

Test your Rest controller using standard HTTP methods:

GET http://myserverhost/index.php/RestExample/1

POST http://myserverhost/index.php/RestExample/

OPTIONS http://myserverhost/index.php/RestExample/

Writing a JSON API

ExEngine converts anything except strings functions results to JSON, encapsulating in an standard response.

Example successful response:

{
    "took":0,
    "code":200,
    "data":{
        "response": "from",
        "the": "function"
    },
    "error":false
}

To get the previous response you should write the following function:

"from", "the" => "function" ] }">
    // ...
    function test() {
        return [
            "response" => "from",
            "the" => "function"
        ]
    }

Issues

Please leave an issue to our GitLab.com project using this link.

About the GitHub repo

The GitHub repository is an always on-sync mirror of our GitLab repository. Feel free to use any of them as your source.

Remember that documentation and issue tracker is hosted in our GitLab repo.

License

The MIT License (MIT)

Copyright (c) 2018-2020 LinkFast S.A. (http://linkfast.io)
Copyright (c) 2018-2020 Giancarlo A. Chiappe Aguilar ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
You might also like...
The Laravel Lumen Framework.

Lumen PHP Framework Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe d

Slim Framework 4 Skeleton Application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Larasymf - mini framework for medium sized projects based on laravel and symfony packages

Larasymf, PHP Framework Larasymf, as its says is a mini framework for medium sized projects based on laravel and symfony packages We have not yet writ

⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.
⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.

Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP. 💧 Files and functions as first-class citi

VELOX - The fastest way to build simple websites using PHP!
VELOX - The fastest way to build simple websites using PHP!

VELOX The fastest way to build simple websites using PHP! Table of Contents Installation About VELOX Architecture Config Classes Functions Themes Chan

A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery.

PHP Netflix Eureka Client A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery. Installation You can install this package

Yet another PHP Microframework.

ρ Yet another PHP Microframework. The premise of this framework is to be backwards-compatible (PHP = 5.6) with powerful utilities (Like caching and l

An ultra-lightweight blogging engine, written in PHP.

简体中文, Italiano. 📣 Translations wanted! Go to the wiki to find out more about translating Chyrp Lite into your language. What can Chyrp Lite do for me

A modern, ultra lightweight and rocket fast Content Management System

Redaxscript A modern, ultra lightweight and rocket fast Content Management System for SQLite, MSSQL, MySQL and PostgreSQL. Installation Clone the repo

Blink is a micro web framework for building long-running and high performance services

Blink is a micro web framework for building long-running and high performance services, the design heavily inspired by Yii2 and Laravel. Blink aims to provide the most expressive and elegant API and try to make the experience of web development as pleasant as possible.

A PHP project/micro-package generator for PDS compliant projects or micro-packages.

Construct A PHP project/micro-package generator for PDS compliant projects or micro-packages. Installation Construct should be installed globally thro

Aimeos PHP e-commerce framework for ultra fast online shops, scalable marketplaces, complex B2B applications
Aimeos PHP e-commerce framework for ultra fast online shops, scalable marketplaces, complex B2B applications

Aimeos is an Open Source e-commerce framework for online shops consisting of the e-commerce library, the administration interface and different front-ends. It's a modular stack that offers an unmatched combination of flexibility and speed.

An application for building micro-services in PHP ^8.

Restolia An application for building micro-services in PHP ^8. Install composer create-project restolia/restolia my-app Services Each service lives i

Kit is a lightweight, high-performance and event-driven web services framework that provides core components such as config, container, http, log and route.

Kit What is it Kit is a lightweight, high-performance and event-driven web services framework that provides core components such as config, container,

An autoscaling Bloom filter with ultra-low memory footprint for PHP

Ok Bloomer An autoscaling Bloom filter with ultra-low memory footprint for PHP. Ok Bloomer employs a novel layered filtering strategy that allows it t

Aimeos is THE professional, full-featured and ultra fast e-commerce package for Laravel 5 and 6
Aimeos is THE professional, full-featured and ultra fast e-commerce package for Laravel 5 and 6

Aimeos is THE professional, full-featured and ultra fast e-commerce package for Laravel 5 and 6! You can install it in your existing Laravel application within 5 minutes and can adapt, extend, overwrite and customize anything to your needs.

Laravel ecommerce package for professional, ultra fast online shops, complex B2B applications and #gigacommerce
Laravel ecommerce package for professional, ultra fast online shops, complex B2B applications and #gigacommerce

Aimeos Laravel ecommerce package ⭐ Star us on GitHub — it helps! Aimeos is THE professional, full-featured and ultra fast e-commerce package for Larav

An ultra-fast Laravel docs search workflow for Alfred 3+.
An ultra-fast Laravel docs search workflow for Alfred 3+.

Laravel Docs Workflow for Alfred An ultra-fast Laravel docs search workflow for Alfred 3+. Installation Download the latest version Install the workfl

Some Joomla! 4.x Web Services Api Examples and Experiments to raise the level of awareness of the huge potiental of Joomla! 4.x Web Services.

j4x-api-examples WHY? If you are a Joomla! developer or want to become a Joomla! developer there is a new resource for you The Official New Joomla! Ma

Owner
linkfast.io
Open source software and contributions by peruvian technology group Link Fast S.A.
linkfast.io
[DEPRECATED -- Use Symfony instead] The PHP micro-framework based on the Symfony Components

Silex, a simple Web Framework WARNING: Silex is in maintenance mode only. Ends of life is set to June 2018. Read more on Symfony's blog. Silex is a PH

Silex 3.6k Dec 22, 2022
A resource-oriented micro PHP framework

Bullet Bullet is a resource-oriented micro PHP framework built around HTTP URIs. Bullet takes a unique functional-style approach to URL routing by par

Vance Lucas 415 Dec 27, 2022
Lemon is php micro framework built for simple applications.

Lemon is simple micro framework that provides routing, etc.

Lemon 20 Dec 16, 2022
TidyPHP is a micro php framework to build web applications

TidyPHP is a micro MVC PHP Framework made to understand how PHP Frameworks work behind the scense and build fast and tidy php web applications.

Amin 15 Jul 28, 2022
Frankie - A frankenstein micro-framework for PHP

Frankie - A frankenstein micro-framework for PHP Features Frankie is a micro-framework focused on annotation. The goal is to use annotation in order t

null 19 Dec 10, 2020
REST-like PHP micro-framework.

Phprest Description REST-like PHP micro-framework. It's based on the Proton (StackPhp compatible) micro-framework. Phprest gives you only the very bas

Phprest 312 Dec 30, 2022
Silly CLI micro-framework based on Symfony Console

currentMenu home Silly CLI micro-framework based on Symfony Console. Professional support for Silly is available via Tidelift Video introduction in fr

Matthieu Napoli 862 Dec 23, 2022
StackSync is a simple, lightweight and native fullstack PHP mini-framework.

StackSync is a fullstack PHP mini framework, with an MVC structure, custom API system with a Middleware and JWT authentication, components based views, flexible routing, PSR4 autoloading. Essential files generation (migrations, seeders, controllers and models) and other operations can be executed through custom commands.

Khomsi Adam 3 Jul 24, 2022
🐺 Lightweight and easy to use framework for building web apps.

Wolff Web development made just right. Wolff is a ridiculously small and lightweight PHP framework, intended for those who want to build web applicati

Alejandro 216 Dec 8, 2022
PHP微服务框架即Micro Service Framework For PHP

Micro Service Framework For PHP PHP微服务框架即“Micro Service Framework For PHP”,是Camera360社区服务器端团队基于Swoole自主研发现代化的PHP协程服务框架,简称msf或者php-msf,是Swoole的工程级企业应用框

Camera360 1.8k Jan 5, 2023