Spaces:
Sleeping
Sleeping
File size: 844 Bytes
07c3cdd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <?php
namespace ProcessMaker\Services;
/**
* Abstract Class Api
*
* Api class be be extended by Restler Classes
*
* @package ProcessMaker\Services
* @author Erik Amaru Ortiz <aortiz.erik@gmail.com, erik@colosa.com>
*/
abstract class Api
{
private static $workspace;
private static $userId;
const STAT_CREATED = 201;
const STAT_APP_EXCEPTION = 400;
public function __construct()
{
self::$workspace = null;
}
public static function setWorkspace($workspace)
{
self::$workspace = $workspace;
}
public function getWorkspace()
{
return self::$workspace;
}
public static function setUserId($userId)
{
self::$userId = $userId;
}
public function getUserId()
{
return \ProcessMaker\Services\OAuth2\Server::getUserId();
}
}
|