Index

BoardFileRepository

MMO\admin\helpers · 1 symbol · generated 5 Oct 2026

class

BoardFileRepository

BoardFileRepository.php:31

A board file (boards/{board}.json, KanbanBoard, served by BoardController) as a repository of mmo.client's kanban entities: one KanbanBoard, its KanbanTickets and their KanbanComments.

class MMO\admin\helpers\BoardFileRepository extends MMO\core\entities\Repository
Namespace
MMO\admin\helpers
Extends
Repository
mmo.git's `BoardSync` merges it with GitHub, as it would a `JsonRepository`, while the file stays what the board's page, its AI prompts and the release checklists read and write. It needs mmo.client, which mmo.admin does not depend on. - It reads the file the first time one of its collections is asked for. - `\MMO\commit()` writes back the entities changed, made or removed, and only them, onto the file as it is then, under its lock ([`KanbanBoard::Edit`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/KanbanBoard.md#kanbanboard-edit), the one the boards' controller takes): what the page saved meanwhile is kept. The board's version goes up, so a page holding the board before reloads it rather than overwriting it. A removed ticket's discussion goes with it. - A new ticket's id is one more than the highest number among the board's tickets; a new comment's, random hex, as the controller gives them.
$board = new BoardFileRepository(['boards' => \MMO\client\entities\KanbanBoard::class, 'tickets' => KanbanTicket::class, 'comments' => KanbanComment::class], '{root}/boards/my.oviepro-deploy.json', 'my.oviepro-deploy'); $board->getCollectionByClass(KanbanTicket::class)->getById('12')->get('title');

Index

board
filename
read
collectionOf($class)
createEntity($class, $data, $collection)Same as Repository::createEntity, giving a ticket or a comment the id the boards' controller would.
file()
getCollection($name)
getCollectionByClass($entityClass, $allowChildClass)
getCollections()
made($entity)an entity read from the file, or written to it, is not a new one
onCommit($commit)Write onto the file what changed among its entities.
read()read the file into the collections, once
uid()
writeComment($b, $comment)a comment onto its ticket's discussion
writeTicket($b, $ticket)a ticket onto the file's tickets: in its place, at the end when new, gone with its discussion when removed
__construct($collections, $filename, $board)

Properties3

board

string $board = 'main'
Type
string

filename

string $filename = ''
Type
string

read

protected bool $read = false
Type
bool

Methods13

getCollectionByClass($entityClass, $allowChildClass)

BoardFileRepository.php:68
function getCollectionByClass(string $entityClass, bool $allowChildClass = true): ?MMO\core\interfaces\iCollection
$entityClassstring
$allowChildClass = truebool
returnsnull | iCollection

made($entity)

BoardFileRepository.php:200

an entity read from the file, or written to it, is not a new one

protected function made(MMO\core\interfaces\iEntity $entity): void
$entityiEntity
returnsvoid

writeTicket($b, $ticket)

BoardFileRepository.php:148

a ticket onto the file's tickets: in its place, at the end when new, gone with its discussion when removed

protected function writeTicket( MMO\admin\helpers\KanbanBoard $b, MMO\client\entities\KanbanTicket $ticket ): void
Inherited members (27)
PropertiesDeclared byDescription
collectionsaRepository
MethodsDeclared byDescription
addCollection($name, $collection)aRepositoryAdd collection
createCollection($name, $entityClass, $collectionId)aRepositoryCreate and register a plain Collection for entities of $entityClass.
createLog($type, $origin, $collection, $data, $filters, $sorts, $limit, $offset)aRepositoryBuild (but not dispatch) a LogQuery entity describing a data-mutating operation, stored in the repository's LogQuery collection (if one is registered).
debugName()aRepository
dropCollection($collection)RepositoryNOTE: this used to just return $this->hasCollection($collection); -- reporting whether the collection exists, but never actually removing it from aRepository::$collections.
executeQuery($query, $opts)RepositoryFind entities by content (delegates to the collection's own in-memory filtering -- see Collection::executeQuery).
forceCommit($origin, $entities)aRepository
generateId($collection)Repository
getCollectionName($collection)aRepository
getDistinct($collection, $key)aRepositoryEvery value one property takes across a collection, once each, in ascending order.
getEntities()aRepository
getIterator()aRepository\IteratorAggregate::getIterator -- iterates name => iCollection
hasCollection($collection)aRepository
hideLogData($collection, $data)aRepositoryWhat a repository logs is what it wrote (mmo.pdo's row, mmo.mongodb's document or its changes), hidden properties (ArrayProperty::isHidden) included, and a log is exported…
logDelete($origin, $collection, $data, $filters, $sorts, $limit, $offset)aRepositoryLog and dispatch a DELETE operation.
logInsert($origin, $collection, $data, $filters, $sorts, $limit, $offset)aRepositoryLog and dispatch an INSERT operation.
logStatus($origin, $collection, $data, $filters, $sorts, $limit, $offset)aRepositoryLog and dispatch a STATUS-change operation.
logUpdate($origin, $collection, $data, $filters, $sorts, $limit, $offset)aRepositoryLog and dispatch an UPDATE operation.
offsetExists($key)aRepository\ArrayAccess::offsetExists
offsetGet($key)aRepository\ArrayAccess::offsetGet
offsetSet($key, $value)aRepository\ArrayAccess::offsetSet -- equivalent to addCollection
offsetUnset($key)aRepository\ArrayAccess::offsetUnset
onFetch($event)aRepositoryListener for Fetch: resolves a repository-uid/collection-id#id (or repository-uid/collection-id#id/nested/path for an embedded value) URL, what Ent…
searchText($query, $text)aRepositoryFull-text search. Not implemented at this level -- a concrete repository backed by a search-capable store should override this.
setCollections($cols)aRepositoryRegister a batch of collections at once, e.g.
__wakeup()aRepositoryRegister this repository's onCommit / onFetch as listeners on the global