XG Proyect

Shortcuts
in package

Shortcuts Class

Tags
category

Classes

author

XG Proyect Team

license

http://www.xgproyect.org XG Proyect

link
http://www.xgproyect.org
version
3.1.0

Table of Contents

$_shortcuts  : array<string|int, mixed>
Contains the shortcuts
__construct()  : void
Constructor
addNew()  : array<string|int, mixed>
Create a new shortcut
deleteById()  : array<string|int, mixed>
Delete a shortcut by ID
editById()  : array<string|int, mixed>
Edit shortcuts by ID
getAllAsArray()  : array<string|int, mixed>
Get all the shortcuts as an Array
getAllAsJsonString()  : string
Get all the shortcuts as a JSON
getById()  : array<string|int, mixed>
Get the shortcut by ID
getShortcuts()  : string
Get the shortcuts
setShortcuts()  : mixed
Set the shortcuts
validateShortcutId()  : int
Validate the shortcut ID

Properties

$_shortcuts

Contains the shortcuts

private array<string|int, mixed> $_shortcuts = []

Methods

__construct()

Constructor

public __construct(string $shortcuts) : void
Parameters
$shortcuts : string

List of shortcuts as a JSON string

Tags
throws
Exception
Return values
void

addNew()

Create a new shortcut

public addNew(string $name, int $g, int $s, int $p, int $pt) : array<string|int, mixed>
Parameters
$name : string
$g : int
$s : int
$p : int
$pt : int
Tags
throws
Exception
Return values
array<string|int, mixed>

deleteById()

Delete a shortcut by ID

public deleteById(int $shortcut_id) : array<string|int, mixed>
Parameters
$shortcut_id : int
Return values
array<string|int, mixed>

editById()

Edit shortcuts by ID

public editById(int $shortcut_id, string $name, int $g, int $s, int $p, int $pt) : array<string|int, mixed>
Parameters
$shortcut_id : int
$name : string
$g : int
$s : int
$p : int
$pt : int
Tags
throws
Exception
Return values
array<string|int, mixed>

getAllAsArray()

Get all the shortcuts as an Array

public getAllAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAllAsJsonString()

Get all the shortcuts as a JSON

public getAllAsJsonString() : string
Return values
string

getById()

Get the shortcut by ID

public getById(int $shortcut_id) : array<string|int, mixed>
Parameters
$shortcut_id : int

Shortcut ID

Return values
array<string|int, mixed>

getShortcuts()

Get the shortcuts

private getShortcuts() : string
Return values
string

setShortcuts()

Set the shortcuts

private setShortcuts(string $shortcuts) : mixed
Parameters
$shortcuts : string

Shortcuts

Return values
mixed

validateShortcutId()

Validate the shortcut ID

private validateShortcutId(type $shortcut_id) : int
Parameters
$shortcut_id : type

Shortcut ID

Return values
int

Search results