public function when(callable $cb, $cbData = null) { if ($this->req || !$this->parsing) { $this->whens[] = [$cb, $cbData]; } else { $cb($this->error, $this->result, $cbData); } return $this; }