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
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$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