sinevia/php-library-serverless

v1.9.0 2020-03-08 09:02 UTC

This package is auto-updated.

Last update: 2024-12-08 20:06:30 UTC


README

Gitpod Ready-to-Code

PHP Library Serverless

Library to help with serverless function development

No Dependencies

Openwhisk

Sets the $_REQUEST and $_SERVER global variables from the arguments passed to the function.

\Sinevia\Serverless::openwhisk($args);

Session

Serverlsess does not support session out of the box. To replicate this functionality the following may be used together with the Sessions plugin which will save the the sessions in the database.

  1. Initiate session
Sinevia\Serverless::sessionStart();
  1. Session ID
\Sinevia\Serverless::sessionId();
  1. Set Session Variable
\Sinevia\Serverless::sessionSet('UserName', 'Sarah');
  1. Get Session Variable
$userName = \Sinevia\Serverless::sessionGet('UserName');