XG Proyect

Notes extends Model
in package

Notes Class

Table of Contents

$db  : Database
Contains the Database instance
__construct()  : mixed
Constructor
__destruct()  : mixed
Destructor
createNewNote()  : void
Create a note by a certain user
deleteNoteById()  : void
Delete a note by a certain user
getAllNotesByUserId()  : array<string|int, mixed>
Get all notes by a certain user
getNoteById()  : array<string|int, mixed>
Get a note by a certain user
updateNoteById()  : void
Update a note by a certain user
setNewDb()  : void
Creates a new Database object

Properties

Methods

__construct()

Constructor

public __construct() : mixed
Return values
mixed

__destruct()

Destructor

public __destruct() : mixed
Return values
mixed

createNewNote()

Create a note by a certain user

public createNewNote(array<string|int, mixed> $note_data) : void
Parameters
$note_data : array<string|int, mixed>
Return values
void

deleteNoteById()

Delete a note by a certain user

public deleteNoteById(int $user_id, string $notes_ids) : void
Parameters
$user_id : int
$notes_ids : string
Return values
void

getAllNotesByUserId()

Get all notes by a certain user

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

getNoteById()

Get a note by a certain user

public getNoteById(int $user_id, int $note_id) : array<string|int, mixed>
Parameters
$user_id : int
$note_id : int
Return values
array<string|int, mixed>

updateNoteById()

Update a note by a certain user

public updateNoteById(int $user_id, int $note_id, array<string|int, mixed> $note_data) : void
Parameters
$user_id : int
$note_id : int
$note_data : array<string|int, mixed>
Return values
void

setNewDb()

Creates a new Database object

private setNewDb() : void
Return values
void

Search results