Skip to content
📡 A simple framework for creating your own API
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config 1. Added DownloadSerializer. Mar 12, 2019
public Updated file permissions May 7, 2018
src/Synful
templates 1. Updated CSV Serializer to use proper CSV formatting Mar 12, 2019
.gitignore ORM Implementation Phase 1 Mar 19, 2018
ISSUE_TEMPLATE.md Update ISSUE_TEMPLATE.md Dec 25, 2018
LICENSE Removed byte shift encryption, added Aes256BitEncryption as an exampl… Sep 28, 2016
Logo.jpg Updated file permissions May 7, 2018
README.md Update README.md Mar 12, 2019
Vagrantfile Added rate limit functionality Jul 9, 2018
composer.json Updated parameter parser from 0.2.0 to 0.2.1 Aug 12, 2018
synful

README.md


StyleCI Latest Stable Version Latest Unstable Version License

Credits


What is it?

Synful is a simple PHP framework that gives you the tools to create a custom web API in minutes.

How can I get it?

Head over to The Wiki Pages for information on how to get Synful and what the next steps are to get your custom API up and running!

Benchmark

On a Vagrant box with 4096MB RAM, 4x CPU, running a LAMP stack using the GetIpExample.php Request Handler.

$ sudo ab -t 60 -c 5 http://127.0.0.1/example/getip
...
Requests per second:    6545.17 [#/sec] (mean)

Preview (RequestHandler)

namespace Synful\App\RequestHandlers;

use \Synful\Util\Framework\RequestHandler;
use \Synful\Util\Framework\Request;

/**
 * Example RequestHandler.
 */
class GetIPExample extends RequestHandler
{
    /**
     * Override the handler endpoint
     * Example: http://myapi.net/user/search
     * uses the endpoint `user/search`.
     *
     * @var string
     */
    public $endpoint = 'example/getip';

    /**
     * Handles a GET request type.
     *
     * @param  \Synful\Util\Framework\Request $request
     * @return \Synful\Util\Framework\Response|array
     */
    public function get(Request $request)
    {
        return [
            'ip' => $request->ip,
        ];
    }
}
You can’t perform that action at this time.