public function cancel() { $this->cb = null; $this->context = null; if ($this->timer !== null) { Timer::remove($this->timer); $this->timer = null; } }