PHP Class CommonQuery, fluentpdo

Inheritance: extends BaseQuery
Afficher le fichier Open project: fpdo/fluentpdo Class Usage Examples

Protected Properties

Свойство Type Description
$isSmartJoinEnabled - Disable adding undefined joins to query?
$joins - Query tables (also include table from clause FROM)

Méthodes publiques

Méthode Description
__call ( $clause, array $parameters = [] )
disableSmartJoin ( )
enableSmartJoin ( )
isSmartJoinEnabled ( ) : boolean
where ( string $condition, mixed $parameters = [] ) : SelectQuery Add where condition, more calls appends with AND

Méthodes protégées

Méthode Description
buildQuery ( ) : string
getClauseJoin ( ) : string

Private Methods

Méthode Description
addJoinStatements ( $clause, $statement, array $parameters = [] ) Statement can contain more tables (e.g. "table1.table2:table3:")
createJoinStatement ( $clause, $mainTable, $joinTable, string $joinAlias = '' ) : string Create join string
createUndefinedJoins ( string $statement ) : string Create undefined joins from statement with column with referenced tables

Method Details

__call() public méthode

public __call ( $clause, array $parameters = [] )
$clause
$parameters array - first is $statement followed by $parameters

buildQuery() protected méthode

protected buildQuery ( ) : string
Résultat string

disableSmartJoin() public méthode

public disableSmartJoin ( )

enableSmartJoin() public méthode

public enableSmartJoin ( )

getClauseJoin() protected méthode

protected getClauseJoin ( ) : string
Résultat string

isSmartJoinEnabled() public méthode

public isSmartJoinEnabled ( ) : boolean
Résultat boolean

where() public méthode

Add where condition, more calls appends with AND
public where ( string $condition, mixed $parameters = [] ) : SelectQuery
$condition string possibly containing ? or :name (PDO syntax)
$parameters mixed array or a scalar value
Résultat SelectQuery

Property Details

$isSmartJoinEnabled protected_oe property

- Disable adding undefined joins to query?
protected $isSmartJoinEnabled

$joins protected_oe property

- Query tables (also include table from clause FROM)
protected $joins