Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Update Class Reference

Public Member Functions

 __construct ($table=null)
 Constructor.
 
 table ($table)
 Specify table for statement.
 
 set (array $values, $flag=self::VALUES_SET)
 Set key/value pairs to update.
 
 where ($predicate, $combination=Predicate\PredicateSet::OP_AND)
 Create where clause.
 
 join ($name, $on, $type=Join::JOIN_INNER)
 Create join clause.
 
 getRawState ($key=null)
 
 __get ($name)
 Variable overloading.
 
 __clone ()
 __clone
 
- Public Member Functions inherited from AbstractPreparableSql
 prepareStatement (AdapterInterface $adapter, StatementContainerInterface $statementContainer)
 
Parameters
AdapterInterface$adapter
StatementContainerInterface$statementContainer
Returns
void

 
- Public Member Functions inherited from AbstractSql
 getSqlString (PlatformInterface $adapterPlatform=null)
 Get SQL string for statement.
Parameters
null | PlatformInterface$adapterPlatform
Returns
string

 

Public Attributes

const SPECIFICATION_UPDATE = 'update'
 #++
 
const SPECIFICATION_SET = 'set'
 
const SPECIFICATION_WHERE = 'where'
 
const SPECIFICATION_JOIN = 'joins'
 
const VALUES_MERGE = 'merge'
 
const VALUES_SET = 'set'
 

Protected Member Functions

 processUpdate (PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 processSet (PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 processWhere (PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 processJoins (PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 

Protected Attributes

 $specifications
 #-
 
 $table = ''
 
 $emptyWhereProtection = true
 
 $set
 
 $where = null
 
 $joins = null
 

Constructor & Destructor Documentation

__construct (   $table = null)

Constructor.

Parameters
null | string | TableIdentifier$table

Member Function Documentation

__clone ( )

__clone

Resets the where object each time the Update is cloned.

Returns
void
__get (   $name)

Variable overloading.

Proxies to "where" only

Parameters
string$name
Returns
mixed
getRawState (   $key = null)
join (   $name,
  $on,
  $type = Join::JOIN_INNER 
)

Create join clause.

Parameters
string | array$name
string$on
string$typeone of the JOIN_* constants
Exceptions
Exception\InvalidArgumentException
Returns
Update
processJoins ( PlatformInterface  $platform,
DriverInterface  $driver = null,
ParameterContainer  $parameterContainer = null 
)
protected
processSet ( PlatformInterface  $platform,
DriverInterface  $driver = null,
ParameterContainer  $parameterContainer = null 
)
protected
processUpdate ( PlatformInterface  $platform,
DriverInterface  $driver = null,
ParameterContainer  $parameterContainer = null 
)
protected
processWhere ( PlatformInterface  $platform,
DriverInterface  $driver = null,
ParameterContainer  $parameterContainer = null 
)
protected
set ( array  $values,
  $flag = self::VALUES_SET 
)

Set key/value pairs to update.

Parameters
array$valuesAssociative array of key values
string$flagOne of the VALUES_* constants
Exceptions
Exception\InvalidArgumentException
Returns
Update
table (   $table)

Specify table for statement.

Parameters
string | TableIdentifier$table
Returns
Update
where (   $predicate,
  $combination = Predicate\PredicateSet::OP_AND 
)

Create where clause.

Parameters
Where | \Closure | string | array$predicate
string$combinationOne of the OP_* constants from Predicate
Exceptions
Exception\InvalidArgumentException
Returns
Update

Member Data Documentation

$emptyWhereProtection = true
protected
$joins = null
protected
$set
protected
$specifications
protected
Initial value:
= [
self::SPECIFICATION_UPDATE => 'UPDATE %1$s'

#-

$table = ''
protected
$where = null
protected
const SPECIFICATION_JOIN = 'joins'
const SPECIFICATION_SET = 'set'
const SPECIFICATION_UPDATE = 'update'

#++

const SPECIFICATION_WHERE = 'where'
const VALUES_MERGE = 'merge'
const VALUES_SET = 'set'