PHP Class WPDKDBListTableModel

PHP does not allow to inherit from more than one class. So one way to solve the problem is to provide a pointer to the class that you want to inherit. This class, therefore, is as if it were understood in this way: class WPDKDBListTableModel extends WPDKListTableModel, WPDKDBTableModel }
Author: =undo= ([email protected])
Inheritance: extends WPDKListTableModel
Afficher le fichier Open project: wpxtreme/wpdk

Méthodes publiques

Свойство Type Description
$table WPDKDBTableModel PHP does not allow to inherit from more than one class. So one way to solve the problem is to provide a pointer to the class that you want to inherit.

Méthodes publiques

Méthode Description
__construct ( string $table_name = '', string $sql_file = '' ) : WPDKDBListTableModel Create an instance of WPDKDBListTableModel class
count ( ) : integer | array Return the integer count of all rows when $distinct param is emmpty or an array of distinct count for $distinct column.
delete ( integer | array $id ) : integer | boolean Delete one or more record from table. Return the number of rows affected/selected or false on error.
insert ( ) : integer | boolean Insert a record by values. Return FALSE if error or id of record if successfully.
status ( integer $id, string $status = WPDKDBTableRowStatuses::PUBLISH ) : mixed Set one or more record with a status.
update ( ) : array | boolean Update a record by values. Return FALSE if error or the $where condiction if successfully.

Method Details

__construct() public méthode

Create an instance of WPDKDBListTableModel class
public __construct ( string $table_name = '', string $sql_file = '' ) : WPDKDBListTableModel
$table_name string Optional. The name of the database table without WordPress prefix
$sql_file string Optional. The filename of SQL file with the database table structure and init data.
Résultat WPDKDBListTableModel

count() public méthode

Return the integer count of all rows when $distinct param is emmpty or an array of distinct count for $distinct column.
public count ( ) : integer | array
Résultat integer | array

delete() public méthode

Use the primaryKey. You can override this method in your subclass.
Since: 1.5.16
public delete ( integer | array $id ) : integer | boolean
$id integer | array Any single int or array list of primary keys
Résultat integer | boolean

insert() public méthode

You can override this method in your subclass.
public insert ( ) : integer | boolean
Résultat integer | boolean

status() public méthode

Set one or more record with a status.
public status ( integer $id, string $status = WPDKDBTableRowStatuses::PUBLISH ) : mixed
$id integer Record ID
$status string Optional. The status, default WPDKDBTableRowStatuses::PUBLISH
Résultat mixed

update() public méthode

You can use the $where condiction returned to get again the record ID. You can override this method in your subclass.
public update ( ) : array | boolean
Résultat array | boolean

Property Details

$table public_oe property

PHP does not allow to inherit from more than one class. So one way to solve the problem is to provide a pointer to the class that you want to inherit.
public WPDKDBTableModel $table
Résultat WPDKDBTableModel