BaseList
provides powerful methods to allow your custom classes to use a database table as List. To start
using the benefits, your class must extends the BaseList
:
class <Your_Class> extends \Boostack\Models\BaseList { ... }
To use \Boostack\Models\BaseList you need to first declare the BaseClass
table into a Constant
CONST BASE_CLASS =::class;
Than initialize the constructor method of the \Boostack\Models\BaseList class
public function __construct(){ parent::init() }
view($fields,$orderColumn,$orderType,$numitem,$currentPage).
view($fields, $orderColumn, $orderType, $numitem, $currentPage);
$fields is a Array composed by three option: columnName, operator and the word to search.
$orderColumn contain the name of column to order by.
$orderType can be "ASC" or "DESC" to get data Ascended or Descended.
$numitem container the Limit element of how much item to view.
$currentPage contain the current page number according to the number of item to view.
loadAll()
truncate()
getIterator()
getItemsArray()
size()
isEmpty()
jsonSerialize()
add($element)
get($key)
remove($key,$shift)
clear()
fill
Jump to BaseList Example →