PHP 클래스 MockDatabase

This is a mockery of our DB class! ... for testing purposes.
상속: extends Airship\Engine\Database
파일 보기 프로젝트 열기: paragonie/airship

보호된 프로퍼티들

프로퍼티 타입 설명
$expect array

공개 메소드들

메소드 설명
__construct ( PDO $pdo = null, string $dbengine = '' ) Dependency-Injectable constructor
beginTransaction ( ) : boolean
column ( string $statement, array $params = [], integer $offset )
commit ( ) : boolean
escapeValueSet ( array $values, string $type = 'string' ) : string
expect ( string $statement = '', null $result = null ) : self
factory ( $dsn, string $username = '', string $password = '', $options = [] ) : Database
getExpected ( string $statement = '' ) : mixed
insert ( string $table, array $map = [] )
insertGet ( string $table, array $map, string $field )
insertMany ( string $table, array $maps ) : boolean
row ( string $statement, $params )
run ( string $statement, $params )
safeQuery ( string $statement, array $params = [], integer $fetch_style = PDO::FETCH_ASSOC )
single ( string $statement, array $params = [] )
update ( string $table, array $changes, array $conditions )

메소드 상세

__construct() 공개 메소드

Dependency-Injectable constructor
public __construct ( PDO $pdo = null, string $dbengine = '' )
$pdo PDO
$dbengine string

beginTransaction() 공개 메소드

public beginTransaction ( ) : boolean
리턴 boolean

column() 공개 메소드

public column ( string $statement, array $params = [], integer $offset )
$statement string
$params array
$offset integer

commit() 공개 메소드

public commit ( ) : boolean
리턴 boolean

escapeValueSet() 공개 메소드

public escapeValueSet ( array $values, string $type = 'string' ) : string
$values array
$type string
리턴 string

expect() 공개 메소드

public expect ( string $statement = '', null $result = null ) : self
$statement string
$result null
리턴 self

factory() 공개 정적인 메소드

public static factory ( $dsn, string $username = '', string $password = '', $options = [] ) : Database
$username string
$password string
리턴 Airship\Engine\Database

getExpected() 공개 메소드

public getExpected ( string $statement = '' ) : mixed
$statement string
리턴 mixed

insert() 공개 메소드

public insert ( string $table, array $map = [] )
$table string
$map array

insertGet() 공개 메소드

public insertGet ( string $table, array $map, string $field )
$table string
$map array
$field string

insertMany() 공개 메소드

public insertMany ( string $table, array $maps ) : boolean
$table string
$maps array
리턴 boolean

row() 공개 메소드

public row ( string $statement, $params )
$statement string

run() 공개 메소드

public run ( string $statement, $params )
$statement string

safeQuery() 공개 메소드

public safeQuery ( string $statement, array $params = [], integer $fetch_style = PDO::FETCH_ASSOC )
$statement string
$params array
$fetch_style integer

single() 공개 메소드

public single ( string $statement, array $params = [] )
$statement string
$params array

update() 공개 메소드

public update ( string $table, array $changes, array $conditions )
$table string
$changes array
$conditions array

프로퍼티 상세

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

protected array $expect
리턴 array