PHP 클래스 Elgg\Mocks\Database

상속: extends Elgg\Database
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$last_insert_id integer

공개 메소드들

메소드 설명
__construct ( Elgg\Database\Config $config, Logger $logger = null )
addQuerySpec ( array $spec ) : integer Set the result of a query that may be called in the future
clearQuerySpecs ( ) : void Remove all query specifications
connect ( $type = "readwrite" )
executeDatabaseQuery ( string $sql, array $params = [] ) : PHPUnit_Framework_MockObject_MockObject Execute database query
getConnection ( $type )
removeQuerySpec ( integer $id ) : void Remove a specified query added by addQuerySpec()
sanitizeString ( $value )
setupConnections ( )

비공개 메소드들

메소드 설명
normalizeSql ( string $query ) : string Attempt to normalize whitespace in a query

메소드 상세

__construct() 공개 메소드

public __construct ( Elgg\Database\Config $config, Logger $logger = null )
$config Elgg\Database\Config
$logger Elgg\Logger

addQuerySpec() 공개 메소드

Set the result of a query that may be called in the future
public addQuerySpec ( array $spec ) : integer
$spec array Query spec
리턴 integer ID of spec

clearQuerySpecs() 공개 메소드

Remove all query specifications
public clearQuerySpecs ( ) : void
리턴 void

connect() 공개 메소드

public connect ( $type = "readwrite" )

executeDatabaseQuery() 공개 메소드

Execute database query
public executeDatabaseQuery ( string $sql, array $params = [] ) : PHPUnit_Framework_MockObject_MockObject
$sql string Query
$params array Query params
리턴 PHPUnit_Framework_MockObject_MockObject (statement)

getConnection() 공개 메소드

public getConnection ( $type )

removeQuerySpec() 공개 메소드

Remove a specified query added by addQuerySpec()
public removeQuerySpec ( integer $id ) : void
$id integer Query spec ID
리턴 void

sanitizeString() 공개 메소드

public sanitizeString ( $value )

setupConnections() 공개 메소드

public setupConnections ( )

프로퍼티 상세

$last_insert_id 공개적으로 프로퍼티

public int $last_insert_id
리턴 integer