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

# Base

## Base

```
object @Base() {
	construct() {}
	callMethod(function $function, ...$arguments): mixed {}
	clone(): object {}
	countSlots(): int {}
	getInternalID(): int {}
	isInstanceOf(mixed $prototype): bool {}
	listPrototypes(): object {}
	listSlotNames(): object {}
	listSlots(): object {}
	toJSON(): string {}
}
```

**Base prototype.**

## Methods


### `$this.construct()`


Dummy fallback constructor function for ease of constructor chaining.

```code
$this.construct(): void
```




### `$this.callMethod()`


Calls a function with variadic arguments, bound as a method to this object.

```code
$this.callMethod(function $function, variadic $arguments): mixed
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |
| arguments | `variadic`  |  | ... |

##### Returns

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




### `$this.clone()`


Clones this object by creating a shallow copy.

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

##### Returns

| Type | Value |
| --- | ---  |
| `object` |  |




### `$this.countSlots()`


Counts the total number of slots within this object.

```code
$this.countSlots(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.getInternalID()`


Gets the unique internal identification number of this object.

```code
$this.getInternalID(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.isInstanceOf()`


Determines whether this object is an instance of a specific prototype.

```code
$this.isInstanceOf(mixed $prototype): bool
```

##### Parameters

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

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `$this.listPrototypes()`


Lists all prototypes of this object.

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

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [prototype, ...] |




### `$this.listSlotNames()`


Lists all slot names of this object.

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

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [name, ...] |




### `$this.listSlots()`


Lists all slots of this object.

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

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [name: value, ...] |




### `$this.toJSON()`


Returns the JavaScript Object Notation (JSON) representation of this object according to RFC 4627.

```code
$this.toJSON(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |
