PHP 클래스 Psecio\Gatekeeper\DataSource

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

공개 프로퍼티들

프로퍼티 타입 설명
$config array Data source configuration options
$lastError string Last error from a datasource request

공개 메소드들

메소드 설명
__construct ( array $config ) Init the object and set the configuration
count ( Modler\Model $model, array $where = [] ) : boolean Return the number of entities in DB per condition or in general
create ( Modler\Model $model ) : boolean Create a new record with model given
delete ( Modler\Model $model ) : boolean Delete the record defined by the model data
find ( Modler\Model $model, array $where = [] ) : object Find and populate a model based on the model type and where criteria
getConfig ( ) : array Get the configuration settings
getLastError ( ) : string Return the last error from action taken on the datasource
save ( Modler\Model $model ) : boolean Save the given model
setConfig ( array $config ) Set the configuration
update ( Modler\Model $model ) : boolean Update the record for the given model

메소드 상세

__construct() 공개 메소드

Init the object and set the configuration
public __construct ( array $config )
$config array Configuration settings

count() 추상적인 공개 메소드

Return the number of entities in DB per condition or in general
abstract public count ( Modler\Model $model, array $where = [] ) : boolean
$model Modler\Model Model instance
$where array
리턴 boolean Success/fail of action

create() 추상적인 공개 메소드

Create a new record with model given
abstract public create ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
리턴 boolean Success/fail of action

delete() 추상적인 공개 메소드

Delete the record defined by the model data
abstract public delete ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
리턴 boolean Success/fail of action

find() 추상적인 공개 메소드

Find and populate a model based on the model type and where criteria
abstract public find ( Modler\Model $model, array $where = [] ) : object
$model Modler\Model Model instance
$where array "Where" data to locate record
리턴 object Either a collection or model instance

getConfig() 공개 메소드

Get the configuration settings
public getConfig ( ) : array
리턴 array Config settings

getLastError() 추상적인 공개 메소드

Return the last error from action taken on the datasource
abstract public getLastError ( ) : string
리턴 string Error string

save() 추상적인 공개 메소드

Save the given model
abstract public save ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
리턴 boolean Success/fail of action

setConfig() 공개 메소드

Set the configuration
public setConfig ( array $config )
$config array Config settings

update() 추상적인 공개 메소드

Update the record for the given model
abstract public update ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
리턴 boolean Success/fail of action

프로퍼티 상세

$config 공개적으로 프로퍼티

Data source configuration options
public array $config
리턴 array

$lastError 공개적으로 프로퍼티

Last error from a datasource request
public string $lastError
리턴 string