PHP 클래스 Cake\Database\ValueBinder

파일 보기 프로젝트 열기: cakephp/cakephp 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_bindings array Array containing a list of bound values to the conditions on this object. Each array entry is another array structure containing the actual bound value, its type and the placeholder it is bound to.
$_bindingsCount integer A counter of the number of parameters bound in this expression object

공개 메소드들

메소드 설명
attachTo ( Cake\Database\StatementInterface $statement ) : void Binds all the stored values in this object to the passed statement.
bind ( string | integer $param, mixed $value, string | integer $type = 'string' ) : void Associates a query placeholder to a value and a type
bindings ( ) : array Returns all values bound to this expression object at this nesting level.
generateManyNamed ( array | Traversable $values, string $type = 'string' ) : array Creates unique named placeholders for each of the passed values and binds them with the specified type.
placeholder ( string $token ) : string Creates a unique placeholder name if the token provided does not start with ":" otherwise, it will return the same string and internally increment the number of placeholders generated by this object.
reset ( ) : void Clears any bindings that were previously registered
resetCount ( ) : void Resets the bindings count without clearing previously bound values

메소드 상세

attachTo() 공개 메소드

Binds all the stored values in this object to the passed statement.
public attachTo ( Cake\Database\StatementInterface $statement ) : void
$statement Cake\Database\StatementInterface The statement to add parameters to.
리턴 void

bind() 공개 메소드

Associates a query placeholder to a value and a type
public bind ( string | integer $param, mixed $value, string | integer $type = 'string' ) : void
$param string | integer placeholder to be replaced with quoted version of $value
$value mixed The value to be bound
$type string | integer the mapped type name, used for casting when sending to database
리턴 void

bindings() 공개 메소드

Subexpression bound values will not be returned with this function.
public bindings ( ) : array
리턴 array

generateManyNamed() 공개 메소드

Creates unique named placeholders for each of the passed values and binds them with the specified type.
public generateManyNamed ( array | Traversable $values, string $type = 'string' ) : array
$values array | Traversable The list of values to be bound
$type string The type with which all values will be bound
리턴 array with the placeholders to insert in the query

placeholder() 공개 메소드

Creates a unique placeholder name if the token provided does not start with ":" otherwise, it will return the same string and internally increment the number of placeholders generated by this object.
public placeholder ( string $token ) : string
$token string string from which the placeholder will be derived from, if it starts with a colon, then the same string is returned
리턴 string to be used as a placeholder in a query expression

reset() 공개 메소드

Clears any bindings that were previously registered
public reset ( ) : void
리턴 void

resetCount() 공개 메소드

Resets the bindings count without clearing previously bound values
public resetCount ( ) : void
리턴 void

프로퍼티 상세

$_bindings 보호되어 있는 프로퍼티

Array containing a list of bound values to the conditions on this object. Each array entry is another array structure containing the actual bound value, its type and the placeholder it is bound to.
protected array $_bindings
리턴 array

$_bindingsCount 보호되어 있는 프로퍼티

A counter of the number of parameters bound in this expression object
protected int $_bindingsCount
리턴 integer