Author: Johan Janssens
(2010/08/28 15:23) Over 1 year ago
Implemented KCommandInterface::getPriority() function.
24
*/
25
protected $_callbacks = array();
26
27
/**
28
29
* The command priority
30
*
31
* @var KIdentifierInterface
32
33
protected $_priority;
34
35
* Object constructor
36
37
* @param object An optional KConfig object with configuration options
38
...
if(is_null($config->command_chain)) {
44
throw new KMixinException('command_chain [KCommandChain] option is required');
45
}
46
47
48
//Set the command priority
49
$this->_priority = $config->command_priority;
39
50
40
//Enque the command in the mixer's command chain
51
41
$config->command_chain->enqueue($this, $config->command_priority);
52
$config->command_chain->enqueue($this, $this->getPriority());
42
53
43
54
55
165
176
166
public function getMixableMethods(KObject $mixer = null)
177
167
{
178
168
return array_diff(parent::getMixableMethods(), array('execute'));
179
return array_diff(parent::getMixableMethods(), array('execute', 'getPriority'));
169
180
181
182
183
* Get the priority of a behavior
184
185
* @return integer The command priority
186
187
public function getPriority()
188
189
return $this->_priority;
190
170
191
if(is_null($config->command_chain)) {if(is_null($config->command_chain)) {throw new KMixinException('command_chain [KCommandChain] option is required');throw new KMixinException('command_chain [KCommandChain] option is required');$config->command_chain->enqueue($this, $config->command_priority);$config->command_chain->enqueue($this, $this->getPriority());{{return array_diff(parent::getMixableMethods(), array('execute'));return array_diff(parent::getMixableMethods(), array('execute', 'getPriority'));{