# PHP · phpDocumentor

Real phpDocumentor XML output from the checked-in php fixture source. Generated artifacts, commands, versions, and SHA-256 hashes are recorded under sources/native. This is a teaching library, not a published SDK.

> Source: https://appgram.github.io/docsy/php-sdk  
> Language: php  
> Symbols: 5 across 3 categories

## Categories

- [Classes](#classes) — 1 items
- [Methods](#methods) — 3 items
- [Properties](#properties) — 1 items

## Classes

### `\Example\Greeter`  <sub>class</sub>

Build personalized greetings without network access.

**Properties**

| Name | Type | Required | Description | Default |

| --- | --- | --- | --- | --- |

| `prefix` | `mixed` | ✓ | Greeting prefix used for future calls. | `&#039;Hello&#039;` |

**Methods**

- `\Example\Greeter::greet()` → `string`  
  Greet a reader.

  - `name: string` — Reader name.

- `\Example\Greeter::greetMany()` → `string`  
  Greet several readers while preserving input order.

  - `names: string[]` — Reader names.

  - `separator: string` (optional) — Separator between greetings.

- `\Example\Greeter::greetChecked()` → `string`  
  Reject an empty reader name.

  - `name: string` — Reader name.

```php
class Greeter
```

**Example**

```php
$greeter = new Greeter(); echo $greeter->greet('Docsy');
```

## Methods

### `\Example\Greeter::greet()`  <sub>method</sub>

Greet a reader.

**Parameters**

| Name | Type | Required | Description |

| --- | --- | --- | --- |

| `name` | `string` | ✓ | Reader name. |

**Returns** — `string` — A friendly greeting.

```php
function greet(string $name)
```

**Example**

```php
echo (new Greeter())->greet('Ada');
```

---

### `\Example\Greeter::greetChecked()`  <sub>method</sub>

Reject an empty reader name.

**Errors**

- `\InvalidArgumentException` — When name is empty.

**Parameters**

| Name | Type | Required | Description |

| --- | --- | --- | --- |

| `name` | `string` | ✓ | Reader name. |

**Returns** — `string` — A validated greeting.

```php
function greetChecked(string $name)
```

---

### `\Example\Greeter::greetMany()`  <sub>method</sub>

Greet several readers while preserving input order.

**Parameters**

| Name | Type | Required | Description |

| --- | --- | --- | --- |

| `names` | `string[]` | ✓ | Reader names. |

| `separator` | `string` |  | Separator between greetings. |

**Returns** — `string` — Joined greetings.

```php
function greetMany(string[] $names, string $separator)
```

**Example**

```php
echo (new Greeter())->greetMany(['Ada', 'Linus']);
```

## Properties

### `\Example\Greeter::$prefix`  <sub>property</sub>

Greeting prefix used for future calls.

```php
property prefix
```
