mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
40 lines
892 B
PHP
40 lines
892 B
PHP
<?php
|
|
|
|
abstract class InterProcessStorage {
|
|
static protected $devid;
|
|
static protected $pid;
|
|
static protected $user;
|
|
static protected $start;
|
|
|
|
/**
|
|
* Indicates if the inter-process mechanism is active
|
|
*
|
|
* @access public
|
|
* @return boolean
|
|
*/
|
|
abstract public function IsActive();
|
|
|
|
/**
|
|
* Initializes internal parameters
|
|
*
|
|
* @access public
|
|
* @return boolean
|
|
*/
|
|
public function InitializeParams() {
|
|
if (!isset(self::$devid)) {
|
|
self::$devid = Request::GetDeviceID();
|
|
self::$pid = @getmypid();
|
|
self::$user = Request::GetAuthUser();
|
|
self::$start = time();
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Reinitializes inter-process data storage
|
|
*
|
|
* @access public
|
|
* @return boolean
|
|
*/
|
|
abstract public function ReInitSharedMem();
|
|
}
|