Now 129341 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.

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
  • JCal Pro
  • kitEvent
  • luryevents
  • 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

restServer have builtin handlers managing IPnumber validation, Cross-Origin Resource Sharing, authentication, messages serializing and en-/decoding. As well as rest service definitions, you can attach custom request message handler(s), invoked before any operation callback. Also a custom (single) final handler can be attached, 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.123), review reports are appreciated!

Credits and base software information

Built status

Dev 0.9.123

Download

Click to get restServer
from github - at packagist
The PHP software was conceived
and written by Kjell-Inge Gustafsson.
Many people have contributed,
hrough providing questions, issues,
reporting bugs and sending patches.
The PHP software are released under the LGPL  /  GPL  /  CC licences. Terms and Conditions
Privacy & Cookies Policy
Linking Policy
GitHub contact
Copyright © 2008-2024 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
Product names mentioned herein are or may be trademarks or registered trademarks of their respective owners.