Menu

## SceneDescription
in package

SceneDescription.php : 10

Abstracts a scene description and provides tools to modify the text more easily.

Class SceneDescription.

### Table of Contents

$description : array<string|int, mixed>
__construct() : mixed
  SceneDescription constructor.
__toString() : string
  Converts the description to a string.
addParagraph() : void
  Adds a paragraph to the description. If the paragraph contains \n\n, it gets broken into multiple paragraphs first.
getDescriptionBack() : string
  Converts the description to a string.
splitIntoParagraphs() : array<string|int, mixed>
  Splits a given string into an array ("paragraphs").

### Properties

#### $description

SceneDescription.php : 12
`private array<string|int, mixed> $description = []`

### Methods

#### __construct()

SceneDescription.php : 18

SceneDescription constructor.

`public __construct(string $description) : mixed`

##### Parameters

$description : string

##### Return values

mixed —

#### __toString()

SceneDescription.php : 27

Converts the description to a string.

`public __toString() : string`

##### Return values

string —

#### addParagraph()

SceneDescription.php : 45

Adds a paragraph to the description. If the paragraph contains \n\n, it gets broken into multiple paragraphs first.

`public addParagraph(string $paragraph) : void`

##### Parameters

$paragraph : string

##### Return values

void —

#### getDescriptionBack()

SceneDescription.php : 36

Converts the description to a string.

`public getDescriptionBack() : string`

##### Return values

string —

#### splitIntoParagraphs()

SceneDescription.php : 58

Splits a given string into an array ("paragraphs").

`private splitIntoParagraphs(string $input) : array<string|int, mixed>`

This method takes a string, normalizes line ends and then splits it at every double line break (\n\n).

##### Parameters

$input : string

##### Return values

array<string|int, mixed> —

## Search results