nyroFwk  0.2
Public Member Functions | Protected Member Functions | Protected Attributes
db_where Class Reference
Inheritance diagram for db_where:
object

Public Member Functions

 getDb ()
 
 clear ()
 
 getClauses ()
 
 setClauses (array $clauses)
 
 add ($prm)
 
 toArray ()
 
 count ()
 
 toString ()
 
 __toString ()
 
 getAttr ($name)
 
 setAttr ($name, $value)
 
 getCfg ()
 

Protected Member Functions

 afterInit ()
 
 beforeInit ()
 

Protected Attributes

 $clauses
 
 $cfg
 

Detailed Description

Where clause to be used in queries

Definition at line 10 of file where.class.php.

Member Function Documentation

◆ __toString()

__toString ( )

Definition at line 138 of file where.class.php.

◆ add()

add (   $prm)

Add a new clause

Parameters
string | array$prmString for a raw clause or an array with the keys:
  • field string The field on which the clause is tested (required)
  • op string The operator for testing (default: =)
  • val string The value to test against (required)

Definition at line 68 of file where.class.php.

◆ afterInit()

afterInit ( )
protected

Definition at line 19 of file where.class.php.

◆ beforeInit()

beforeInit ( )
protectedinherited

Call just before the configuration initialisation

Definition at line 35 of file object.class.php.

◆ clear()

clear ( )

Clear all clauses

Definition at line 38 of file where.class.php.

◆ count()

count ( )

Get the number of clauses

Returns
int

Definition at line 116 of file where.class.php.

◆ getAttr()

getAttr (   $name)
inherited

Get an attribute

Parameters
string$nameAttribute name
Returns
mixed|null The attribute or null if not set

Definition at line 48 of file object.class.php.

◆ getCfg()

getCfg ( )
inherited

Get the configuration object

Returns
config

Definition at line 67 of file object.class.php.

◆ getClauses()

getClauses ( )

Get all clauses

Returns
array

Definition at line 47 of file where.class.php.

◆ getDb()

getDb ( )

Get the db object

Returns
db_abstract

Definition at line 31 of file where.class.php.

◆ setAttr()

setAttr (   $name,
  $value 
)
inherited

Set an attribute

Parameters
string$nameAttribute name
mixed$valueAttribute value

Definition at line 58 of file object.class.php.

◆ setClauses()

setClauses ( array  $clauses)

Set a new array of clauses

Parameters
array$clauses

Definition at line 56 of file where.class.php.

◆ toArray()

toArray ( )

Get the clauses as an array

Returns
array With keys:
  • bind array value to bind
  • where string Full Where clause to use

Definition at line 85 of file where.class.php.

◆ toString()

toString ( )

Get the where clause as a string

Returns
string

Definition at line 125 of file where.class.php.

Field Documentation

◆ $cfg

$cfg
protectedinherited

Definition at line 17 of file object.class.php.

◆ $clauses

$clauses
protected

Definition at line 17 of file where.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13