PHP Class _WPDKDBTable

## Overview Let's we say that is not easy design and coding a well done CRUD engine for WordPress. However we have try to do this in a simple first release.
Deprecation: Since 0.9
Author: =undo= ([email protected])
Afficher le fichier Open project: wpxtreme/wpdk

Méthodes publiques

Свойство Type Description
$arrayStatuses array
$sdfArrayStatuses array
$tableName string
$wpdb wpdb

Méthodes publiques

Méthode Description
__construct ( string $tableName, string $index_name = 'id' ) : _WPDKDBTable
arrayStatusesGroupBy ( ) : array
count ( ) : integer
delete ( array | integer $indexes ) : boolean | integer
query ( string $where = '1' ) : array | null
tableName ( string $tableName ) : string
update ( array | integer $indexes, array $fields ) : boolean | integer

Méthodes protégées

Méthode Description
arrayStatuses ( ) : array
sdfArrayStatuses ( ) : array
updateTable ( string $sql_filename, string $tableName )

Method Details

__construct() public méthode

public __construct ( string $tableName, string $index_name = 'id' ) : _WPDKDBTable
$tableName string Table name without WordPress prefix
$index_name string Optional index name, default `id`
Résultat _WPDKDBTable

arrayStatuses() protected méthode

protected arrayStatuses ( ) : array
Résultat array

arrayStatusesGroupBy() public méthode

public arrayStatusesGroupBy ( ) : array
Résultat array

count() public méthode

public count ( ) : integer
Résultat integer

delete() public méthode

public delete ( array | integer $indexes ) : boolean | integer
$indexes array | integer List of index or single index
Résultat boolean | integer

query() public méthode

public query ( string $where = '1' ) : array | null
$where string
Résultat array | null Array of object or NULL

sdfArrayStatuses() protected méthode

protected sdfArrayStatuses ( ) : array
Résultat array

tableName() static public méthode

static public tableName ( string $tableName ) : string
$tableName string Simple table name
Résultat string Complete WordPress table name

update() public méthode

public update ( array | integer $indexes, array $fields ) : boolean | integer
$indexes array | integer List of index or single index
$fields array Key value pairs array field => value
Résultat boolean | integer

updateTable() protected static méthode

protected static updateTable ( string $sql_filename, string $tableName )
$sql_filename string Complete path of sql file
$tableName string Simple table name without WordPress Prefix. The WordPress prefix is auto add by this method

Property Details

$arrayStatuses public_oe property

public array $arrayStatuses
Résultat array

$sdfArrayStatuses public_oe property

public array $sdfArrayStatuses
Résultat array

$tableName public_oe property

public string $tableName
Résultat string

$wpdb public_oe property

public wpdb $wpdb
Résultat wpdb