Method |
Description |
|
arrayStatusesForSDF ( array $statuses ) : array |
Restituisce un array in formato SDF |
|
cache ( string $table_name, integer $id, stdClass $record = null ) : stdClass | null |
Legge o imposta un transient/cache. |
|
count ( string $table_name ) : integer |
Restituisce il numero di record della tabella |
|
create ( string $table_name, array $values ) : mixed |
Crea, inserisce, un record in tabella |
|
delete ( string $table_name, integer | array $record, string $id_field = 'id' ) : mixed |
Elimina uno o più record a partire sempre dall'id |
|
record ( string $table_name, integer | object | array $record, string $id_field = 'id', string $output = OBJECT ) : boolean |
Estrae un singolo record |
|
records ( string $table_name, string $where, string $order_by = '', string $output = OBJECT ) : mixed |
Estrae un insieme di record |
|
slug ( $table_name ) |
|
|
status ( string $table_name, integer $record, string $id_field = 'id', string $field_name = 'post_status' ) : mixed |
Legge lo stato attuale di un record. Lo status è per default nel campo 'post_status' se presente. |
|
statusesWithCount ( string $table_name, array $statuses, string $field_name = 'status' ) : array |
Restituisce un array con il tipo di status, la sua label e la count sul database |
|
trash ( string $table_name, integer | array $record, string $id_field = 'id', string $field_name = 'post_status', string $value = 'trash' ) : mixed |
Imposta lo stato di uno o più record a 'trash' e memorizza lo stato attuale nella post meta con chiave
'_[table name]_status' |
|
untrash ( string $table_name, integer | array $record, string $id_field = 'id', string $field_name = 'post_status' ) : boolean |
Repristina uno o più record dal cestino recuperando lo stato precedente dalla chiave ''_[table name]_status'
nella post meta. Se non la trova pone il record in status 'unknown' |
|
update ( string $table_name, integer | object | array $record, array $values, string $id_field = 'id', array $formats = [] ) : mixed |
Esegue l'update di un record |
|
where ( string | array $where, string $glue = 'AND' ) : string |
Prepara una condizione di WHERE partendo da un semplice stringa o da un Key value pairs campo/valore. Se il valore
non è una stringa la condizione è campo = valore. Se il valore è una stringa la condizione è campo = 'valore'. |
|