PHP Class CommonQuery, fluentpdo

Inheritance: extends BaseQuery
Mostra file Open project: fpdo/fluentpdo Class Usage Examples

Protected Properties

Property Type Description
$isSmartJoinEnabled - Disable adding undefined joins to query?
$joins - Query tables (also include table from clause FROM)

Public Methods

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

Protected Methods

Method Description
buildQuery ( ) : string
getClauseJoin ( ) : string

Private Methods

Method 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 method

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

buildQuery() protected method

protected buildQuery ( ) : string
return string

disableSmartJoin() public method

public disableSmartJoin ( )

enableSmartJoin() public method

public enableSmartJoin ( )

getClauseJoin() protected method

protected getClauseJoin ( ) : string
return string

isSmartJoinEnabled() public method

public isSmartJoinEnabled ( ) : boolean
return boolean

where() public method

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
return 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