2017 © Pedro PelĂĄez
 

library libmodule

Lib that helps the creation of PHP modules for the PPP

image

ppp/libmodule

Lib that helps the creation of PHP modules for the PPP

  • Thursday, March 10, 2016
  • by Tpt
  • Repository
  • 6 Watchers
  • 0 Stars
  • 2,016 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Basic lib to write PPP modules in PHP

Build Status Code Coverage Scrutinizer Code Quality, (*1)

On Packagist: Latest Stable Version Download count, (*2)

Installation

Use one of the below methods:, (*3)

1 - Use composer to install the library and all its dependencies using the master branch:, (*4)

composer require "ppp/libmodule":"dev-master"

2 - Create a composer.json file that just defines a dependency on version 0.2 of this package, and run 'composer install' in the directory:, (*5)

{
    "require": {
        "ppp/ppp/libmodule"": "~0.2.0"
    }
}

Example

Here is a small usage example:, (*6)

// Load everything
require_once(__DIR__ . "/vendor/autoload.php");

// A very simple class implementing RequestHandler interface
class MyRequestHandler implements PPP\Module\RequestHandler {
    public function buildResponse(PPP\Module\DataModel\ModuleRequest $request) {
        return new PPP\Module\DataModel\ModuleResponse(
            $request->getLanguageCode(),
            new PPP\DataModel\MissingNode(),
            0
        );
    }
}

// Lets run the entry point!
$entryPoint = new PPP\Module\ModuleEntryPoint(new MyRequestHandler());
$entryPoint->exec();

The Versions

10/03 2016

dev-master

9999999-dev https://github.com/ProjetPP/PPP-LibModule-PHP

Lib that helps the creation of PHP modules for the PPP

  Sources   Download

MIT

The Requires

 

ppp