Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Server
Method
Callback.php
Go to the documentation of this file.
1
<?php
32
class
Zend_Server_Method_Callback
33
{
37
protected
$_class
;
38
42
protected
$_function
;
43
47
protected
$_method
;
48
52
protected
$_type
;
53
57
protected
$_types
= array(
'function'
,
'static'
,
'instance'
);
58
65
public
function
__construct
(
$options
=
null
)
66
{
67
if
((
null
!==
$options
) && is_array(
$options
)) {
68
$this->
setOptions
(
$options
);
69
}
70
}
71
78
public
function
setOptions
(array
$options
)
79
{
80
foreach
(
$options
as $key =>
$value
) {
81
$method
=
'set'
. ucfirst($key);
82
if
(method_exists($this,
$method
)) {
83
$this->
$method
(
$value
);
84
}
85
}
86
return
$this;
87
}
88
95
public
function
setClass
(
$class
)
96
{
97
if
(is_object(
$class
)) {
98
$class
= get_class(
$class
);
99
}
100
$this->_class =
$class
;
101
return
$this;
102
}
103
109
public
function
getClass
()
110
{
111
return
$this->_class
;
112
}
113
120
public
function
setFunction
($function)
121
{
122
$this->_function = (string) $function;
123
$this->
setType
(
'function'
);
124
return
$this;
125
}
126
132
public
function
getFunction
()
133
{
134
return
$this->_function
;
135
}
136
143
public
function
setMethod
(
$method
)
144
{
145
$this->_method =
$method
;
146
return
$this;
147
}
148
154
public
function
getMethod
()
155
{
156
return
$this->_method
;
157
}
158
166
public
function
setType
(
$type
)
167
{
168
if
(!in_array(
$type
, $this->_types)) {
169
#require_once 'Zend/Server/Exception.php';
170
throw
new
Zend_Server_Exception
(
'Invalid method callback type passed to '
. __CLASS__ .
'::'
. __METHOD__);
171
}
172
$this->_type =
$type
;
173
return
$this;
174
}
175
181
public
function
getType
()
182
{
183
return
$this->_type
;
184
}
185
191
public
function
toArray
()
192
{
193
$type
= $this->
getType
();
194
$array = array(
195
'type'
=>
$type
,
196
);
197
if
(
'function'
==
$type
) {
198
$array[
'function'
] = $this->
getFunction
();
199
}
else
{
200
$array[
'class'
] = $this->
getClass
();
201
$array[
'method'
] = $this->
getMethod
();
202
}
203
return
$array;
204
}
205
}
Zend_Server_Method_Callback\setOptions
setOptions(array $options)
Definition:
Callback.php:78
Zend_Server_Method_Callback\getFunction
getFunction()
Definition:
Callback.php:132
Zend_Server_Method_Callback\$_method
$_method
Definition:
Callback.php:47
Zend_Server_Method_Callback\setFunction
setFunction($function)
Definition:
Callback.php:120
Zend_Server_Method_Callback\setClass
setClass($class)
Definition:
Callback.php:95
Zend_Server_Method_Callback\toArray
toArray()
Definition:
Callback.php:191
Zend_Server_Method_Callback\$_types
$_types
Definition:
Callback.php:57
Zend_Server_Method_Callback\$_type
$_type
Definition:
Callback.php:52
Zend_Server_Method_Callback\setType
setType($type)
Definition:
Callback.php:166
Zend_Server_Method_Callback\$_class
$_class
Definition:
Callback.php:37
$type
$type
Definition:
item.phtml:13
$class
$_option $_optionId $class
Definition:
date.phtml:13
$value
$value
Definition:
gender.phtml:16
Zend_Server_Method_Callback\$_function
$_function
Definition:
Callback.php:42
Zend_Server_Method_Callback
Definition:
Callback.php:32
Zend_Server_Method_Callback\setMethod
setMethod($method)
Definition:
Callback.php:143
$method
$method
Definition:
info.phtml:13
Zend_Server_Exception
Definition:
Exception.php:33
Zend_Server_Method_Callback\getType
getType()
Definition:
Callback.php:181
Zend_Server_Method_Callback\getClass
getClass()
Definition:
Callback.php:109
Zend_Server_Method_Callback\__construct
__construct($options=null)
Definition:
Callback.php:65
Zend_Server_Method_Callback\getMethod
getMethod()
Definition:
Callback.php:154
$options
$options
Definition:
multiple_mixed_products.php:29