PHP 클래스 yii\caching\DbDependency

If the query result changes, the dependency is considered as changed. The query is specified via the [[sql]] property. For more details and usage information on Cache, see the guide article on caching.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\caching\Dependency
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$db the application component ID of the DB connection.
$params the parameters (name => value) to be bound to the SQL statement specified by [[sql]].
$sql the SQL query whose result is used to determine if the dependency has been changed. Only the first row of the query result will be used.

보호된 메소드들

메소드 설명
generateDependencyData ( Cache $cache ) : mixed Generates the data needed to determine if dependency has been changed.

메소드 상세

generateDependencyData() 보호된 메소드

This method returns the value of the global state.
protected generateDependencyData ( Cache $cache ) : mixed
$cache Cache the cache component that is currently evaluating this dependency
리턴 mixed the data needed to determine if dependency has been changed.

프로퍼티 상세

$db 공개적으로 프로퍼티

the application component ID of the DB connection.
public $db

$params 공개적으로 프로퍼티

the parameters (name => value) to be bound to the SQL statement specified by [[sql]].
public $params

$sql 공개적으로 프로퍼티

the SQL query whose result is used to determine if the dependency has been changed. Only the first row of the query result will be used.
public $sql