2014-01-30 19:15:10 -04:00
|
|
|
<?php
|
|
|
|
|
namespace ProcessMaker\Project;
|
|
|
|
|
|
|
|
|
|
use ProcessMaker\Util\Logger;
|
|
|
|
|
|
2014-01-31 18:49:57 -04:00
|
|
|
abstract class ProjectHandler //implements ProjectHandlerInterface
|
2014-01-30 19:15:10 -04:00
|
|
|
{
|
2014-01-31 18:49:57 -04:00
|
|
|
public abstract function save();
|
|
|
|
|
public abstract function update();
|
|
|
|
|
public abstract function delete();
|
2014-01-30 19:15:10 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Log in ProcessMaker Standard Output if debug mode is enabled.
|
|
|
|
|
*
|
|
|
|
|
* @author Erik Amaru Ortiz <aortiz.erik at icloud dot com>
|
|
|
|
|
* @internal param $args this method receives N-Arguments dynamically with any type, string, array, object, etc
|
|
|
|
|
* it means that you ca use it by example:
|
|
|
|
|
*
|
|
|
|
|
* self::log("Beginning transaction");
|
|
|
|
|
* self::log("Method: ", __METHOD__, 'Returns: ', $result);
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public static function log()
|
|
|
|
|
{
|
|
|
|
|
if (System::isDebugMode()) {
|
|
|
|
|
|
|
|
|
|
$me = Logger::getInstance();
|
|
|
|
|
$args = func_get_args();
|
|
|
|
|
//array_unshift($args, 'Class '.__CLASS__.' ');
|
|
|
|
|
|
|
|
|
|
call_user_func_array(array($me, 'setLog'), $args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|