File tree 1 file changed +26
-0
lines changed 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,32 @@ public function __construct(array $options = array())
107
107
$ this ->_options ['cache_file_umask ' ] = $ this ->_options ['file_mode ' ];
108
108
}
109
109
110
+ /**
111
+ * OVERRIDDEN to remove use of each() which is deprecated in PHP 7.2
112
+ *
113
+ * Set the frontend directives
114
+ *
115
+ * @param array $directives Assoc of directives
116
+ * @throws Zend_Cache_Exception
117
+ * @return void
118
+ */
119
+ public function setDirectives ($ directives )
120
+ {
121
+ if (!is_array ($ directives )) Zend_Cache::throwException ('Directives parameter must be an array ' );
122
+ foreach ($ directives as $ name => $ value ) {
123
+ if (!is_string ($ name )) {
124
+ Zend_Cache::throwException ("Incorrect option name : $ name " );
125
+ }
126
+ $ name = strtolower ($ name );
127
+ if (array_key_exists ($ name , $ this ->_directives )) {
128
+ $ this ->_directives [$ name ] = $ value ;
129
+ }
130
+
131
+ }
132
+
133
+ $ this ->_loggerSanity ();
134
+ }
135
+
110
136
/**
111
137
* Test if a cache is available for the given id and (if yes) return it (false else)
112
138
*
You can’t perform that action at this time.
0 commit comments