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 trait like functionality in 5.3

__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 "trait" methods to this class.

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

Parameters

$trait

string

The name of the trait

$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

 Properties

 

Bound parameters

$params : array

 

The name of the table

$table : string

 

A list of traits that the query can passthru

$traits : array

 

A map of passthru methods

$method_map : array