The base Query class for SELECT, INSERT, UPDATE and DELETE statement.

These four classes will share some functionality, so let us share!

package Peyote
author Dave Widmer

 Methods

The only bit of magic in this codebase. This is necessary so we can add mixins.

__call(string $name, $params) : \Peyote\Query

Parameters

$name

string

The name of the method to call

$params

Exceptions

\Peyote\Exception

Returns

Creates the method map. Make sure you call parent::__construct() after all of your main passthru objects are created.

__construct(string $table) 

Parameters

$table

string

The name of the table

Adds "mixin" methods to this class.

addMethods(string $mixin, array $methods) : \Petoyte\Query

Parameters

$mixin

string

The name of the mixin

$methods

array

A list of methods to add

Returns

\Petoyte\Query

Gets all of the bound parameters for this query.

getParams() : array

Returns

array

Sets the name of the table.

table(string $name) : \Peyote\Query

Parameters

$name

string

The table name

Returns

Compiles all of the mixins into an array.

compileMixins() : array

Returns

arrayAll of the mixins into an array.

 Properties

 

A list of mixins that the query can passthru

$mixins : array

 

Bound parameters

$params : array

 

The name of the table

$table : string

 

A map of passthru methods

$method_map : array