XOOPS  2.6.0
Xoops\Core\Kernel\Criteria Class Reference
Inheritance diagram for Xoops\Core\Kernel\Criteria:
Inheritance graph

Public Member Functions

 __construct ($column, $value= '', $operator= '=', $prefix= '', $function= '')
 
 buildExpressionQb (QueryBuilder $qb)
 
 render ()
 
 renderLdap ()
 
 renderQb (QueryBuilder $qb=null, $whereMode= '')
 
 renderWhere ()
 
- Public Member Functions inherited from Xoops\Core\Kernel\CriteriaElement
 buildExpressionQb (QueryBuilder $qb)
 
 getGroupby ()
 
 getLimit ()
 
 getOrder ()
 
 getSort ()
 
 getStart ()
 
 render ()
 
 renderLdap ()
 
 renderQb (QueryBuilder $qb=null, $whereMode= '')
 
 renderWhere ()
 
 setGroupby ($group)
 
 setLimit ($limit=0)
 
 setOrder ($order)
 
 setSort ($sort)
 
 setStart ($start=0)
 

Public Attributes

 $column
 
 $function
 
 $operator
 
 $prefix
 
 $value
 

Additional Inherited Members

- Protected Attributes inherited from Xoops\Core\Kernel\CriteriaElement
 $groupby = ''
 
 $limit = 0
 
 $order = 'ASC'
 
 $sort = ''
 
 $start = 0
 

Detailed Description

Definition at line 30 of file Criteria.php.

Constructor & Destructor Documentation

Xoops\Core\Kernel\Criteria::__construct (   $column,
  $value = '',
  $operator = '=',
  $prefix = '',
  $function = '' 
)

Constructor

Parameters
string$columncolumn criteria applies to
string$valuevalue to compare to column
string$operatoroperator to apply to column
string$prefixprefix to append to column
string$functionsprintf string taking one string argument applied to column

Definition at line 66 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\$column, Xoops\Core\Kernel\Criteria\$function, Xoops\Core\Kernel\Criteria\$operator, Xoops\Core\Kernel\Criteria\$prefix, and Xoops\Core\Kernel\Criteria\$value.

Member Function Documentation

Xoops\Core\Kernel\Criteria::buildExpressionQb ( QueryBuilder  $qb)

Build an expression to be included in a Doctrine QueryBuilder instance.

This method will build an expression, adding any parameters to the query, but the caller is responsible for adding the expression to the query, for example as where() parameter. This allows the caller to handle all context, such as parenthetical groupings.

Parameters
QueryBuilder$qbquery builder instance
Returns
string expression

Definition at line 283 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\$column, Xoops\Core\Kernel\Criteria\$operator, and Xoops\Core\Kernel\Criteria\$value.

Referenced by Xoops\Core\Kernel\Criteria\renderQb().

Here is the caller graph for this function:

Xoops\Core\Kernel\Criteria::render ( )

Make a sql condition string

Returns
string

Definition at line 80 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\$operator, and Xoops\Core\Kernel\Criteria\$value.

Referenced by Xoops\Core\Kernel\Criteria\renderWhere().

Here is the caller graph for this function:

Xoops\Core\Kernel\Criteria::renderLdap ( )

Generate an LDAP filter from criteria

Returns
string
Author
Nathan Dial ndial.nosp@m.@tri.nosp@m.llion.nosp@m.21.c.nosp@m.om, improved by Pierre-Eric MENUET pemen.nosp@m.@sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net

Definition at line 113 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\$operator, and $uid.

Xoops\Core\Kernel\Criteria::renderQb ( QueryBuilder  $qb = null,
  $whereMode = '' 
)

Render criteria as Doctrine QueryBuilder instructions

Parameters
QueryBuilder$qbquery builder instance
string$whereModehow does this fit in the passed in QueryBuilder? '' = as where,'and'= as andWhere, 'or' = as orWhere
Returns
QueryBuilder query builder instance

Definition at line 161 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\buildExpressionQb(), and Xoops\getInstance().

Here is the call graph for this function:

Xoops\Core\Kernel\Criteria::renderWhere ( )

Make a SQL "WHERE" clause

Returns
string

Definition at line 146 of file Criteria.php.

References Xoops\Core\Kernel\Criteria\render().

Here is the call graph for this function:

Member Data Documentation

Xoops\Core\Kernel\Criteria::$column
Xoops\Core\Kernel\Criteria::$function

Definition at line 40 of file Criteria.php.

Referenced by Xoops\Core\Kernel\Criteria\__construct().

Xoops\Core\Kernel\Criteria::$prefix

Definition at line 35 of file Criteria.php.

Referenced by Xoops\Core\Kernel\Criteria\__construct().

Xoops\Core\Kernel\Criteria::$value

The documentation for this class was generated from the following file: