1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00
z-push_ynh/sources/lib/ipc/interprocessstorage.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();
}