PHP 클래스 ManaPHP\Mvc\Model\Manager

상속: extends ManaPHP\Component, implements ManaPHP\Mvc\Model\ManagerInterface
파일 보기 프로젝트 열기: manaphp/manaphp

보호된 프로퍼티들

프로퍼티 타입 설명
$_builder ManaPHP\Mvc\Model\QueryBuilderInterface
$_readConnectionServices array
$_recallGetModelSource boolean
$_sources array
$_writeConnectionServices array

공개 메소드들

메소드 설명
createBuilder ( string | array $params = null ) : ManaPHP\Mvc\Model\QueryBuilderInterface Creates a \ManaPHP\Mvc\Model\Query\Builder
getLastQuery ( ) : string Returns the latest query created or executed in the models manager
getModelSource ( ManaPHP\Mvc\ModelInterface | string $model ) : string Returns the mapped source for a model
getReadConnection ( ManaPHP\Mvc\ModelInterface | string $model ) : ManaPHP\DbInterface Returns the connection to read data related to a model
getReadConnectionService ( ManaPHP\Mvc\ModelInterface | string $model ) : string Returns the connection service name used to read data related to a model
getWriteConnection ( ManaPHP\Mvc\ModelInterface | string $model ) : ManaPHP\DbInterface Returns the connection to write data related to a model
getWriteConnectionService ( ManaPHP\Mvc\ModelInterface | string $model ) : string Returns the connection service name used to write data related to a model
setConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static Sets both write and read connection service for a model
setModelSource ( ManaPHP\Mvc\ModelInterface | string $model, string $source ) : static Sets the mapped source for a model
setReadConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static Sets read connection service for a model
setWriteConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static Sets write connection service for a model

메소드 상세

createBuilder() 공개 메소드

Creates a \ManaPHP\Mvc\Model\Query\Builder
public createBuilder ( string | array $params = null ) : ManaPHP\Mvc\Model\QueryBuilderInterface
$params string | array
리턴 ManaPHP\Mvc\Model\QueryBuilderInterface

getLastQuery() 공개 메소드

Returns the latest query created or executed in the models manager
public getLastQuery ( ) : string
리턴 string

getModelSource() 공개 메소드

Returns the mapped source for a model
public getModelSource ( ManaPHP\Mvc\ModelInterface | string $model ) : string
$model ManaPHP\Mvc\ModelInterface | string
리턴 string

getReadConnection() 공개 메소드

Returns the connection to read data related to a model
public getReadConnection ( ManaPHP\Mvc\ModelInterface | string $model ) : ManaPHP\DbInterface
$model ManaPHP\Mvc\ModelInterface | string
리턴 ManaPHP\DbInterface

getReadConnectionService() 공개 메소드

Returns the connection service name used to read data related to a model
public getReadConnectionService ( ManaPHP\Mvc\ModelInterface | string $model ) : string
$model ManaPHP\Mvc\ModelInterface | string
리턴 string

getWriteConnection() 공개 메소드

Returns the connection to write data related to a model
public getWriteConnection ( ManaPHP\Mvc\ModelInterface | string $model ) : ManaPHP\DbInterface
$model ManaPHP\Mvc\ModelInterface | string
리턴 ManaPHP\DbInterface

getWriteConnectionService() 공개 메소드

Returns the connection service name used to write data related to a model
public getWriteConnectionService ( ManaPHP\Mvc\ModelInterface | string $model ) : string
$model ManaPHP\Mvc\ModelInterface | string
리턴 string

setConnectionService() 공개 메소드

Sets both write and read connection service for a model
public setConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static
$model ManaPHP\Mvc\ModelInterface | string
$connectionService string
리턴 static

setModelSource() 공개 메소드

Sets the mapped source for a model
public setModelSource ( ManaPHP\Mvc\ModelInterface | string $model, string $source ) : static
$model ManaPHP\Mvc\ModelInterface | string
$source string
리턴 static

setReadConnectionService() 공개 메소드

Sets read connection service for a model
public setReadConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static
$model ManaPHP\Mvc\ModelInterface | string
$connectionService string
리턴 static

setWriteConnectionService() 공개 메소드

Sets write connection service for a model
public setWriteConnectionService ( ManaPHP\Mvc\ModelInterface | string $model, string $connectionService ) : static
$model ManaPHP\Mvc\ModelInterface | string
$connectionService string
리턴 static

프로퍼티 상세

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

protected QueryBuilderInterface,ManaPHP\Mvc\Model $_builder
리턴 ManaPHP\Mvc\Model\QueryBuilderInterface

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

protected array $_readConnectionServices
리턴 array

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

protected bool $_recallGetModelSource
리턴 boolean

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

protected array $_sources
리턴 array

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

protected array $_writeConnectionServices
리턴 array