Documentation

Table extends AbstractGateway
in package
implements Countable, IteratorAggregate

Table gateway class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
6.5.0

Table of Contents

Interfaces

Countable
IteratorAggregate

Properties

$rows  : array<string|int, mixed>
Result rows
$table  : string|null
Table

Methods

__construct()  : mixed
Constructor
count()  : int
Method to get the count of items in the collection
delete()  : Table
Delete from a table
getIterator()  : ArrayIterator
Method to iterate over the table rows
getNumberOfRows()  : int
Get the number of result rows
getRows()  : array<string|int, mixed>
Get the result rows
getTable()  : string
Get the table name
getTableInfo()  : array<string|int, mixed>
Get table info
hasRows()  : bool
Has rows
insert()  : Table
Insert a row of values into the table
insertRows()  : Table
Insert rows of values into the table
rows()  : array<string|int, mixed>
Get the result rows (alias method)
select()  : array<string|int, mixed>
Select rows from the table
setRows()  : Table
Set all the table rows at once
toArray()  : array<string|int, mixed>
Method to convert table gateway to an array (alias method)
update()  : Table
Update a table

Properties

$rows

Result rows

protected array<string|int, mixed> $rows = []

Methods

__construct()

Constructor

public __construct(string $table) : mixed

Instantiate the AbstractGateway object.

Parameters
$table : string

count()

Method to get the count of items in the collection

public count() : int
Return values
int

delete()

Delete from a table

public delete([mixed $where = null ][, array<string|int, mixed> $parameters = [] ]) : Table
Parameters
$where : mixed = null
$parameters : array<string|int, mixed> = []
Return values
Table

getIterator()

Method to iterate over the table rows

public getIterator() : ArrayIterator
Return values
ArrayIterator

getNumberOfRows()

Get the number of result rows

public getNumberOfRows() : int
Return values
int

getRows()

Get the result rows

public getRows() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTable()

Get the table name

public getTable() : string
Return values
string

hasRows()

Has rows

public hasRows() : bool
Return values
bool

insert()

Insert a row of values into the table

public insert(array<string|int, mixed> $columns) : Table
Parameters
$columns : array<string|int, mixed>
Return values
Table

insertRows()

Insert rows of values into the table

public insertRows(array<string|int, mixed> $values) : Table
Parameters
$values : array<string|int, mixed>
Return values
Table

rows()

Get the result rows (alias method)

public rows() : array<string|int, mixed>
Return values
array<string|int, mixed>

select()

Select rows from the table

public select([array<string|int, mixed>|null $columns = null ][, mixed $where = null ][, array<string|int, mixed>|null $parameters = null ][, array<string|int, mixed>|null $options = null ]) : array<string|int, mixed>
Parameters
$columns : array<string|int, mixed>|null = null
$where : mixed = null
$parameters : array<string|int, mixed>|null = null
$options : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>

setRows()

Set all the table rows at once

public setRows([array<string|int, mixed> $rows = [] ]) : Table
Parameters
$rows : array<string|int, mixed> = []
Return values
Table

toArray()

Method to convert table gateway to an array (alias method)

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

update()

Update a table

public update(array<string|int, mixed> $columns[, mixed $where = null ][, array<string|int, mixed>|null $parameters = [] ]) : Table
Parameters
$columns : array<string|int, mixed>
$where : mixed = null
$parameters : array<string|int, mixed>|null = []
Return values
Table

        
On this page

Search results