Files
luos/workflow/engine/src/Services/Api/ProcessMaker/Test2.php
Erik Amaru Ortiz b25efdd866 Adding Rest Api Service Support
Rest Service on plugins
-----------------------

1. enable service

add the following line in plugin __constructor main class
$this->enableRestService(true);

2. Create the sources directory structure by example:
if you plugin is named myPlugin

myPlugin
    |--src
        |--Services
             |--Api
                 |--MyPlugin
                      |--Test.php

Where Test.php is a Restler class
2013-12-03 17:10:18 -04:00

31 lines
493 B
PHP

<?php
namespace Services\Api\ProcessMaker;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
class Test2 extends Api
{
function hello2()
{
return 'Hello #2';
}
/**
* @url GET /getHello
*/
function helloworld($param = '')
{
return 'Greetings, from a overridden url ' . $param;
}
/**
* @url GET /sample/other/large/:name
*/
function sampleOther($name)
{
return 'Name: ' . $name;
}
}