Esc
API Index — Namespaces, Packages, Reports, Indices
Notes
in package
Table of Contents
Methods
- create() : int|null
- delete() : bool
- list() : array<int, array<string, mixed>>
- read() : array<string, mixed>|null
- search() : array<int, array<string, mixed>>
- update() : bool
Methods
create()
public
static create(PDO $db, int $userId, string $title, string $body) : int|null
Parameters
- $db : PDO
- $userId : int
- $title : string
- $body : string
Return values
int|nulldelete()
public
static delete(PDO $db, int $userId, int $noteId) : bool
Parameters
- $db : PDO
- $userId : int
- $noteId : int
Return values
boollist()
public
static list(PDO $db, int $userId) : array<int, array<string, mixed>>
Parameters
- $db : PDO
- $userId : int
Return values
array<int, array<string, mixed>>read()
public
static read(PDO $db, int $userId, int $noteId) : array<string, mixed>|null
Parameters
- $db : PDO
- $userId : int
- $noteId : int
Return values
array<string, mixed>|nullsearch()
public
static search(PDO $db, int $userId, string $query[, int $limit = 10 ]) : array<int, array<string, mixed>>
Parameters
- $db : PDO
- $userId : int
- $query : string
- $limit : int = 10
Return values
array<int, array<string, mixed>>update()
public
static update(PDO $db, int $userId, int $noteId, string|null $title, string|null $body) : bool
Parameters
- $db : PDO
- $userId : int
- $noteId : int
- $title : string|null
- $body : string|null