public function unlisten()
{
if (!$this->_listeningenabled) {
return;
}
$fx = array_filter(get_class_methods($this), array($this, 'filter_prado_fx'));
foreach ($fx as $func) {
$this->detachEventHandler($func, array($this, $func));
}
if (is_a($this, 'Prado\\Util\\IDynamicMethods')) {
$this->detachEventHandler(TComponent::GLOBAL_RAISE_EVENT_LISTENER, array($this, '__dycall'));
array_push($fx, TComponent::GLOBAL_RAISE_EVENT_LISTENER);
}
$this->_listeningenabled = false;
$this->dyUnlisten($fx);
return count($fx);
}