Zed. The source code to build a world.

Scene extends Entity
in package

Geo scene class

This class provides methods to determine and renders the local scene.

Table of Contents

Properties

$lastError  : string
Last error or warning
$location  : Location
The location of the scene to print
$sceneFile  : string
File scene to serve
$db  : DatabaseEngine

Methods

__construct()  : mixed
Initializes a new Scene instance
get_file_extension()  : string
Gets file extension
getDatabase()  : DatabaseEngine
render()  : mixed
Renders the file
setDatabase()  : void
get_global_scene()  : bool
Gets global scene
get_local_scene()  : bool
Gets local scene
try_get_scene()  : bool
Tries to get the scene file.

Properties

$lastError

Last error or warning

public string $lastError = ""

$location

The location of the scene to print

public Location $location

$sceneFile

File scene to serve

public string $sceneFile

Methods

__construct()

Initializes a new Scene instance

public __construct(Location $location) : mixed
Parameters
$location : Location

location the scene is to print

get_file_extension()

Gets file extension

public static get_file_extension(string $file) : string
Parameters
$file : string

the file path

Return values
string

the file extension

getDatabase()

public getDatabase() : DatabaseEngine
Return values
DatabaseEngine

render()

Renders the file

public render() : mixed

setDatabase()

public setDatabase(DatabaseEngine $db) : void
Parameters
$db : DatabaseEngine

get_global_scene()

Gets global scene

private get_global_scene() : bool
Return values
bool

true if a scene have been found ; otherwise, false.

get_local_scene()

Gets local scene

private get_local_scene() : bool
Return values
bool

true if a scene have been found ; otherwise, false.

try_get_scene()

Tries to get the scene file.

private try_get_scene(mixed $code) : bool

It will try to find in the scene directory a file with $code as name, and .tpl .png .gif .bmp .swf .html or .php as extension.

Parameters
$code : mixed
Return values
bool

true if a scene file have been found and set ; otherwise, false.


        
On this page

Search results