Definition at line 30 of file Backend.php.
◆ __construct()
__construct |
( |
array |
$options = array() | ) |
|
Constructor
- Parameters
-
array | $options | Associative array of options |
Definition at line 62 of file Backend.php.
if(!isset($_GET['name'])) $name
◆ _isGoodTmpDir()
Verify if the given temporary directory is readable and writable
- Parameters
-
string | $dir | temporary directory |
- Returns
- boolean true if the directory is ok
Definition at line 226 of file Backend.php.
◆ _log()
_log |
( |
|
$message, |
|
|
|
$priority = 4 |
|
) |
| |
|
protected |
Log a message at the WARN (4) priority.
- Parameters
-
string | $message | |
int | $priority | |
- Returns
- void
Definition at line 273 of file Backend.php.
275 if (!$this->_directives[
'logging']) {
279 if (!isset($this->_directives[
'logger'])) {
282 $logger = $this->_directives[
'logger'];
static throwException($msg, Exception $e=null)
◆ _loggerSanity()
Make sure if we enable logging that the Zend_Log class is available. Create a default log object if none is set.
- Exceptions
-
- Returns
- void
Definition at line 244 of file Backend.php.
246 if (!isset($this->_directives[
'logging']) || !$this->_directives[
'logging']) {
250 if (isset($this->_directives[
'logger'])) {
251 if ($this->_directives[
'logger'] instanceof
Zend_Log) {
258 #require_once 'Zend/Log.php'; 259 #require_once 'Zend/Log/Writer/Stream.php'; 260 #require_once 'Zend/Log/Filter/Priority.php'; 263 $this->_directives[
'logger'] =
$logger;
static throwException($msg, Exception $e=null)
◆ getLifetime()
getLifetime |
( |
|
$specificLifetime | ) |
|
Get the life time
if $specificLifetime is not false, the given specific life time is used else, the global lifetime is used
- Parameters
-
- Returns
- int Cache life time
Definition at line 143 of file Backend.php.
145 if ($specificLifetime ===
false) {
146 return $this->_directives[
'lifetime'];
148 return $specificLifetime;
◆ getOption()
Returns an option
- Parameters
-
string | $name | Optional, the options name to return |
- Exceptions
-
- Returns
- mixed
Definition at line 119 of file Backend.php.
123 if (array_key_exists(
$name, $this->_options)) {
124 return $this->_options[
$name];
127 if (array_key_exists(
$name, $this->_directives)) {
128 return $this->_directives[
$name];
static throwException($msg, Exception $e=null)
if(!isset($_GET['name'])) $name
◆ getTmpDir()
Determine system TMP directory and detect if we have read access
inspired from Zend_File_Transfer_Adapter_Abstract
- Returns
- string
- Exceptions
-
Definition at line 172 of file Backend.php.
175 foreach (array($_ENV, $_SERVER) as $tab) {
176 foreach (array(
'TMPDIR',
'TEMP',
'TMP',
'windir',
'SystemRoot') as $key) {
177 if (isset($tab[$key]) && is_string($tab[$key])) {
178 if (($key ==
'windir') or ($key ==
'SystemRoot')) {
179 $dir = realpath($tab[$key] .
'\\temp');
181 $dir = realpath($tab[$key]);
189 $upload =
ini_get(
'upload_tmp_dir');
191 $dir = realpath($upload);
197 $dir = sys_get_temp_dir();
203 $tempFile = tempnam(md5(uniqid(rand(), TRUE)),
'');
205 $dir = realpath(dirname($tempFile));
static throwException($msg, Exception $e=null)
◆ isAutomaticCleaningAvailable()
isAutomaticCleaningAvailable |
( |
| ) |
|
Return true if the automatic cleaning is available for the backend
DEPRECATED : use getCapabilities() instead
- Deprecated:
- Returns
- boolean
Definition at line 159 of file Backend.php.
◆ setDirectives()
setDirectives |
( |
|
$directives | ) |
|
Set the frontend directives
- Parameters
-
array | $directives | Assoc of directives |
- Exceptions
-
- Returns
- void
Definition at line 76 of file Backend.php.
80 if (!is_string(
$name)) {
84 if (array_key_exists(
$name, $this->_directives)) {
static throwException($msg, Exception $e=null)
if(!isset($_GET['name'])) $name
◆ setOption()
setOption |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Set an option
- Parameters
-
- Exceptions
-
- Returns
- void
Definition at line 101 of file Backend.php.
103 if (!is_string(
$name)) {
107 if (array_key_exists(
$name, $this->_options)) {
static throwException($msg, Exception $e=null)
if(!isset($_GET['name'])) $name
◆ $_directives
Initial value:= array(
'lifetime' => 3600,
'logging' => false,
'logger' => null
)
Definition at line 44 of file Backend.php.
◆ $_options
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Cache/Backend.php