PHP Класс 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 }
Автор: =undo= ([email protected])
Наследование: extends WPDKListTableModel
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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.
Результат WPDKDBListTableModel

count() публичный Метод

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
Результат integer | array

delete() публичный Метод

Use the primaryKey. You can override this method in your subclass.
С версии: 1.5.16
public delete ( integer | array $id ) : integer | boolean
$id integer | array Any single int or array list of primary keys
Результат integer | boolean

insert() публичный Метод

You can override this method in your subclass.
public insert ( ) : integer | boolean
Результат integer | boolean

status() публичный Метод

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
Результат mixed

update() публичный Метод

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
Результат array | boolean

Описание свойств

$table публичное свойство

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
Результат WPDKDBTableModel