kigkonsult logo

Now 129 096 iCalcreator
users worldwide!!

Services

kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations of PHP/MySQL solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.

If you need any custom modules, modification or amendment based on iCalcreator to suit your needs or professional support, don't hesitate to contact us.


Sponsored Links
Custom Search

iCalcreator used in.. .

  • AgenDAV
  • albaven
  • All-in-One Event Calendar
  • Bugscope
  • Date iCal
  • Dokeos
  • event_connect
  • ESS Feed
  • Exponent CMS
  • EQDKP Plus
  • GCalendar
  • GLPI
  • Gumbo Millennium
  • Hypecal
  • iCal
  • iCalendar-to-Facebook-Event
  • JCal Pro
  • kitEvent
  • MarkupiCalendar
  • One Big SYSTem
  • Open Atrium
  • Repository based CMS
  • sfiCalCreatorPlugin
  • Telaen
  • terncal
  • twical
  • Virtual Loup-De-Mer
  • "Weather Forecast"
  •  
  • And many more.. .
  •  

Tell us

what iCalcreator is missing,
use the contact page

Support us

Link to our site from yours!    kigkonsult.se - iCal PHP software 

We will create a link to your site in our list of featured users!

Credits & Licenses plus

iCalcreator and the related PHP software was conceived and written by Kjell-Inge Gustafsson.

Many people have contributed, through providing questions, issues, reporting bugs and sending patches.

iCalcreator (standard) and the related PHP software are released under the LGPL  /  GPL  /  CC licences.

This site uses:
cssmenumaker 
FotoramaMIT
jQueryMIT/GPL
jQuery UIMIT/GPL
jQuery TimepickerMIT/GPL
PHPMailerLGPL
prototypeCC BY-SA
reCAPTCHA 

restServer

rest services made easy

restServer provides

Install

To install with composer:


composer require kigkonsult/restserver

Requires PHP 5.6, 7.*

Usage

Example usage:

<?php

require "/path/to/vendor/autoload.php";

// Implement an application rest service operation entry
// (or any callable with the same interface)
$callback = function(
    ServerRequestInterface $request,
    ResponseInterface      $response
) {
    return $response->withRawBody( [ "Hello" => "world" ] );
};

// Set up the rest service definition (method, uri and callback)
$restGetServiceDef = [
    RestServer::METHOD   => RequestMethodHandler::METHOD_GET,
    RestServer::URI      => "/",
    RestServer::CALLBACK => $callback
];

// Attach the service definition(s) and fire of the server
RestServer::factory()->attachRestService( $restGetServiceDef )->run();

More example usage:

<?php

require '/path/to/vendor/autoload.php';

$RestServer = new RestServer();

$attachRestServiceCallback = $RestServer->getAttachRestServiceCallback();

class ApplicationClass2
{
    public function registerAsRestService(
        $attachRestServiceCallback
    ) {
        $attachRestServiceCallback(
            RequestMethodHandler::METHOD_GET,
            '/',
            [$this, 'action']
        );
    }

    public function action(
        ServerRequestInterface $request,
        ResponseInterface      $response
    ) {
        return $response->withRawBody( ['msg' => 'Hello world'] );
    }
}

$ApplicationClass2 = new ApplicationClass2();
$ApplicationClass2->registerAsRestService( $attachRestServiceCallback );

$RestServer->run();

Rest service definition

You have to implement one or more rest service entries for your application logic. Each entry with one or more http request methods and a (single) uri (ex "/"), form a service definition. The service definitions, attached to restServer, are interfaces to your application logic.

Handlers

Aside from rest service definitions, you can attach custom request message handler(s), invoked before any operation callback as well as (a single) final handler, invoked after response is returned.

Documentation

In the restServer package docs folder are found

For restServer issues, use github issues. Due to the restServer development status (ver 0.9.26), review reports are appreciated!

Credits and base software information

Built status

Dev 0.9.26

Download

Click to get restServer
from github

The PHP software are designed
and developed by Kjell-Inge Gustafsson.
Many people have contributed,
providing questions, issues,
reporting bugs and patches.
The PHP software are licenced under
LGPL  /  GPL  /  CC
Terms and Conditions
Privacy & Cookies Policy
Linking Policy
kigkonsult Contact
GitHub
Sourceforge
Copyright © 2008-2018 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
Product names mentioned herein are or may be trademarks or registered trademarks of their respective owners.