i have been using cakephp ver2.x , started migrating cakephp v3.x. when tried using new orm, baffled basic concepts repositories , table objects. difference between repositories , table objects?
a repository can while table, name states, table.
http://api.cakephp.org/3.0/class-cake.orm.table.html
represents single database table.
exposes methods retrieving data out of it, , manages associations table has other tables. multiple instances of class can created same database table different aliases, allows address database structure in richer , more expressive way.
http://api.cakephp.org/3.0/class-cake.datasource.repositoryinterface.html
describes methods class representing data storage should comply with.
a data storage can kind of storage system, 1 doesn't know tables graph db or document based system.
it simple check api documentation , code kind of questions. code pretty documented. way works becomes obvious then:
class table implements repositoryinterface, eventlistenerinterface
table implements interface defined repositoryinterface.
Comments
Post a Comment