Files
luos/workflow/engine/src/ProcessMaker/Services/Api.php

46 lines
844 B
PHP
Raw Normal View History

2013-09-04 16:11:33 -04:00
<?php
namespace ProcessMaker\Services;
2013-09-04 16:11:33 -04:00
/**
* 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
2013-09-04 16:11:33 -04:00
{
private static $workspace;
2013-10-09 13:16:05 -04:00
private static $userId;
2013-09-04 16:11:33 -04:00
const STAT_CREATED = 201;
const STAT_APP_EXCEPTION = 400;
2013-11-07 12:37:16 -04:00
2017-08-22 14:48:01 -04:00
public function __construct()
2013-09-04 16:11:33 -04:00
{
2013-09-05 10:04:02 -04:00
self::$workspace = null;
2013-09-04 16:11:33 -04:00
}
public static function setWorkspace($workspace)
{
self::$workspace = $workspace;
}
public function getWorkspace()
{
return self::$workspace;
}
2013-10-09 13:16:05 -04:00
public static function setUserId($userId)
{
self::$userId = $userId;
}
public function getUserId()
{
return \ProcessMaker\Services\OAuth2\Server::getUserId();
2013-10-09 13:16:05 -04:00
}
2014-01-27 17:35:58 -04:00
}