/** * Injects the \Stackable storage handler into the instance. * * @param string $identifier Unique identifier for the cache storage * * @return void */ public function __construct($identifier = null) { // inject the stackable storage $this->injectStorage(array()); // call the parent constructor to initialize + flush the storage parent::__construct($identifier); }
function __construct($storageName, $ttl = null, $withSession = false) { parent::__construct($storageName, $ttl, $withSession); if ($withSession) { $this->name .= Session::getInstance()->getId(); } $this->name = md5($this->name); $this->dir = self::getDir($this->name); }
/** * Constructor * @todo use global options */ public function __construct() { /*$di = \Centreon\Internal\Di::getDefault(); $dbconn = $di->get('db_centreon'); /* Get the path for rrd metrics and status * $query = "SELECT RRDdatabase_path, RRDdatabase_status_path FROM rt_configs WHERE id = 1"; $stmt = $dbconn->query($query); $row = $stmt->fetch(); $this->rrdPath = $row['RRDdatabase_path']; $this->rrdStatusPath = $row['RRDdatabase_status_path'];*/ $this->rrdPath = '/var/lib/centreon/metrics/'; $this->rrdStatusPath = '/var/lib/centreon/status/'; parent::__construct(); }
/** * Constructor. * * @api */ public function __construct() { parent::__construct(); }