Zed. The source code to build a world.

DemoStoryHook extends StoryHook
in package

Story hook demo class

Table of Contents

Properties

$perso  : Perso
The character involved in the story
$section  : mixed
$story  : Story
The current story

Methods

__construct()  : mixed
Constructor
add_content()  : string
Adds HTML code *AT THE END* of the story content block
add_html()  : mixed
Adds content after our story content block
get_choices_links()  : mixed
Updates the current section choices
initialize()  : mixed
Initializes resources
update_description()  : mixed
Updates the current section description.

Properties

$perso

The character involved in the story

public Perso $perso

$section

public mixed $section

Methods

__construct()

Constructor

public __construct(Story $story, StorySection $section) : mixed
Parameters
$story : Story

The story including this hook

$section : StorySection

The section including this hook

add_content()

Adds HTML code *AT THE END* of the story content block

public add_content() : string
Return values
string

add_html()

Adds content after our story content block

public add_html() : mixed
Tags
see
StoryHook::add_html

Updates the current section choices

public get_choices_links(array<string|int, mixed> &$links) : mixed
Parameters
$links : array<string|int, mixed>

the section links

Tags
see
StoryHook::get_choices_links

initialize()

Initializes resources

public initialize() : mixed
Tags
see
StoryHook::initialize

The initialize method is called after the constructor and is mandatory, even if you've nothing to initialize, as it's an abstract method.

update_description()

Updates the current section description.

public update_description(string &$description) : mixed
Parameters
$description : string

the description to update

Tags
see
StoryHook::update_description

        
On this page

Search results