PHP 클래스 OCA\Richdocuments\Db

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

보호된 프로퍼티들

프로퍼티 타입 설명
$data
$insertStatement
$loadStatement
$tableName

공개 메소드들

메소드 설명
__call ( $name, $arguments )
__construct ( $data = [] )
deleteBy ( string $field, mixed $value ) Delete records matching the condition
getCollection ( ) : array Get all records from the table
getCollectionBy ( string $field, mixed $value ) : array Get array of matching records
getData ( ) : Array Get object data
getLastInsertId ( ) : mixed Get id of the recently inserted record
hasData ( ) : boolean Check if there are any data in current object
insert ( ) : mixed Insert current object data into database
load ( integer $value ) : Db Get single record by primary key
loadBy ( string $field, mixed $value ) : Db Get single record matching condition
setData ( array $data ) Set object data

보호된 메소드들

메소드 설명
buildInQuery ( string $field, Array $array ) : String Build placeholders for the query with variable input data
execute ( string $statement, mixed $args = null ) : mixed Execute a query on database

메소드 상세

__call() 공개 메소드

public __call ( $name, $arguments )

__construct() 공개 메소드

public __construct ( $data = [] )

buildInQuery() 보호된 메소드

Build placeholders for the query with variable input data
protected buildInQuery ( string $field, Array $array ) : String
$field string field name
$array Array data
리턴 String `field` IN (?, ?...) placeholders matching the number of elements in array

deleteBy() 공개 메소드

Delete records matching the condition
public deleteBy ( string $field, mixed $value )
$field string for WHERE condition
$value mixed matching value(s)

execute() 보호된 메소드

Execute a query on database
protected execute ( string $statement, mixed $args = null ) : mixed
$statement string query to be executed
$args mixed value(s) for the query. If omited the query will be run on the current object $data
리턴 mixed (array/false)

getCollection() 공개 메소드

Get all records from the table
public getCollection ( ) : array
리턴 array

getCollectionBy() 공개 메소드

Get array of matching records
public getCollectionBy ( string $field, mixed $value ) : array
$field string for WHERE condition
$value mixed matching value(s)
리턴 array

getData() 공개 메소드

Get object data
public getData ( ) : Array
리턴 Array

getLastInsertId() 공개 메소드

Get id of the recently inserted record
public getLastInsertId ( ) : mixed
리턴 mixed

hasData() 공개 메소드

Check if there are any data in current object
public hasData ( ) : boolean
리턴 boolean

insert() 공개 메소드

Insert current object data into database
public insert ( ) : mixed
리턴 mixed

load() 공개 메소드

Get single record by primary key
public load ( integer $value ) : Db
$value integer primary key value
리턴 Db

loadBy() 공개 메소드

Get single record matching condition
public loadBy ( string $field, mixed $value ) : Db
$field string for WHERE condition
$value mixed matching value(s)
리턴 Db

setData() 공개 메소드

Set object data
public setData ( array $data )
$data array

프로퍼티 상세

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

protected $data

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

protected $insertStatement

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

protected $loadStatement

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

protected $tableName