PHP Interface Spot\QueryInterface

Afficher le fichier Open project: vlucas/spot Interface Usage Examples

Méthodes publiques

Méthode Description
__construct ( Mapper $mapper, $entityName ) : string Constructor
andWhere ( array $conditions = [], $type = "AND" )
from ( string $table = null ) From
group ( array $fields = [] ) GROUP BY columns
having ( array $having = [] ) HAVING query or result set
limit ( $limit = 20, $offset = null ) LIMIT query or result set
orWhere ( array $conditions = [], $type = "AND" )
order ( $fields = [] ) ORDER BY columns
select ( mixed $fields = "*", string $table ) : string Called from mapper's select() function
where ( array $conditions = [], string $type = "AND", string $setType = "AND" ) WHERE conditions

Method Details

__construct() public méthode

Constructor
public __construct ( Mapper $mapper, $entityName ) : string
$mapper Mapper
Résultat string

andWhere() public méthode

public andWhere ( array $conditions = [], $type = "AND" )
$conditions array

from() public méthode

From
public from ( string $table = null )
$table string Name of the table to perform the SELECT query on

group() public méthode

GROUP BY columns
public group ( array $fields = [] )
$fields array

having() public méthode

HAVING query or result set
public having ( array $having = [] )
$having array

limit() public méthode

LIMIT query or result set
public limit ( $limit = 20, $offset = null )

orWhere() public méthode

public orWhere ( array $conditions = [], $type = "AND" )
$conditions array

order() public méthode

ORDER BY columns
public order ( $fields = [] )

select() public méthode

Called from mapper's select() function
public select ( mixed $fields = "*", string $table ) : string
$fields mixed (optional)
$table string Table name
Résultat string

where() public méthode

WHERE conditions
public where ( array $conditions = [], string $type = "AND", string $setType = "AND" )
$conditions array Array of conditions for this clause
$type string Keyword that will separate each condition - "AND", "OR"
$setType string Keyword that will separate the whole set of conditions - "AND", "OR"