Sets the generator flag that is true when the function is a generator
bool $generator Generator flag:
$this
public function setGenerator($generator) { $this->generator = (bool) $generator; return $this; }