Shortcuts
in package
Shortcuts Class
Tags
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
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
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
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