PHP 클래스 League\FactoryMuffin\Stores\RepositoryStore

저자: Graham Campbell ([email protected])
저자: Michael Bodnarchuk ([email protected])
상속: extends AbstractStore, implements League\FactoryMuffin\Stores\StoreInterface
파일 보기 프로젝트 열기: zizaco/factory-muff

보호된 프로퍼티들

프로퍼티 타입 설명
$storage object For Doctrine, this will be an EntityManager instance.

공개 메소드들

메소드 설명
__construct ( object $storage, string | null $saveMethod = null, string | null $deleteMethod = null, $flushMethod = null ) : void Create a new repository store instance.
deleteSaved ( ) : void Delete all the saved models.

보호된 메소드들

메소드 설명
delete ( object $model ) : boolean Delete our object from the db.
flush ( ) : boolean Flushes changes to storage.
save ( object $model ) : boolean Save our object to the db, and keep track of it.

메소드 상세

__construct() 공개 메소드

Create a new repository store instance.
public __construct ( object $storage, string | null $saveMethod = null, string | null $deleteMethod = null, $flushMethod = null ) : void
$storage object
$saveMethod string | null
$deleteMethod string | null
리턴 void

delete() 보호된 메소드

Delete our object from the db.
protected delete ( object $model ) : boolean
$model object The model instance.
리턴 boolean

deleteSaved() 공개 메소드

Delete all the saved models.
public deleteSaved ( ) : void
리턴 void

flush() 보호된 메소드

Flushes changes to storage.
protected flush ( ) : boolean
리턴 boolean

save() 보호된 메소드

Save our object to the db, and keep track of it.
protected save ( object $model ) : boolean
$model object The model instance.
리턴 boolean

프로퍼티 상세

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

For Doctrine, this will be an EntityManager instance.
protected object $storage
리턴 object