Definition at line 33 of file Callback.php.
◆ __construct()
Constructor
- Parameters
-
string | array | $callback | Callback in a call_user_func format |
mixed | $options | (Optional) Default options for this filter |
Definition at line 55 of file Callback.php.
61 $temp[
'callback'] = array_shift(
$options);
63 $temp[
'options'] = array_shift(
$options);
69 if (!array_key_exists(
'callback',
$options)) {
70 #require_once 'Zend/Filter/Exception.php'; 75 if (array_key_exists(
'options',
$options)) {
setCallback($callback, $options=null)
◆ filter()
Calls the filter per callback
- Parameters
-
mixed | $value | Options for the set callback |
- Returns
- mixed Result from the filter which was callbacked
Implements Zend_Filter_Interface.
Definition at line 136 of file Callback.php.
140 if ($this->_options !==
null) {
141 if (!is_array($this->_options)) {
150 return call_user_func_array($this->_callback,
$options);
◆ getCallback()
Returns the set callback
- Returns
- string|array Set callback
Definition at line 85 of file Callback.php.
◆ getOptions()
Returns the set default options
- Returns
- mixed
Definition at line 113 of file Callback.php.
◆ setCallback()
setCallback |
( |
|
$callback, |
|
|
|
$options = null |
|
) |
| |
Sets a new callback for this filter
- Parameters
-
- Returns
- unknown
Definition at line 96 of file Callback.php.
98 if (!is_callable($callback)) {
99 #require_once 'Zend/Filter/Exception.php'; 103 $this->_callback = $callback;
◆ setOptions()
◆ $_callback
◆ $_options
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Filter/Callback.php