---
title: "Generator"
description: "Abstract generator prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/generator"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/generator.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# Generator

## Generator

```
object @Generator(@Base) {
	getResult(): mixed {}
	next(): object {}
	send(mixed $value): object {}
	throw(mixed $exception): object {}
}
```

**Abstract generator prototype.**

### Prototype

**[Base](#)**

## Methods


### `$this.getResult()`


```code
$this.getResult(): mixed
```

##### Returns

| Type | Value |
| --- | ---  |
| `mixed` |  |
| `null` |  |




### `$this.next()`


Resumes this generator.

```code
$this.next(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [key: value] |
| `null` |  |




### `$this.send()`


```code
$this.send(mixed $value): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| value | `mixed`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [key: value] |
| `null` |  |




### `$this.throw()`


```code
$this.throw(mixed $exception): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| exception | `mixed`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [key: value] |
| `null` |  |
