protected function process_data(&$signal) { $result = parent::process_data($signal); if ($result) { sleep($this->delay); } return $result; }
protected function process_data(&$signal) { if (parent::process_data($signal) === false) { return false; } $elements = $signal->data_element($this->default_data_key); foreach ($elements as $key => $element) { if (isset($this->element_type)) { $element_type = $this->element_type; } else { $element_type = $signal->data_type($this->default_data_key); } $new_signal = new LineSignal_Data($element, $element_type, $key); $this->propagate_signal($new_signal); } return true; }
protected function process_data(&$signal) { if (!isset($this->elements_type)) { $this->elements_type = $signal->data_type($this->default_data_key); } if (parent::process_data($signal)) { if (count($this->elements) < $this->group_size) { $data_element = $signal->data_element($this->default_data_key); if ($this->set_original_data_key) { $this->elements[$signal->data_element_key($this->default_data_key)] = $data_element; } else { $this->elements[] = $data_element; } return false; } else { $signal->set_data_element($this->default_data_key, $this->elements); $signal->set_data_type($this->default_data_key, $this->elements_type); $this->elements = array(); return true; } } else { return false; } }
protected function set_params($params) { $this->_set_param($params, 'reverse'); return parent::set_params($params); }