BoardFileRepository
MMO\admin\helpers · 1 symbol · generated 5 Oct 2026
BoardFileRepository
BoardFileRepository.php:31A 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.
- Namespace
MMO\admin\helpers- Extends
- Repository
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
- Type
- string
filename
- Type
- string
read
- Type
- bool
Methods13
collectionOf($class)
BoardFileRepository.php:211| $class | string | |
| returns | iCollection | |
| throws | when it has no collection of $class |
createEntity($class, $data, $collection)
BoardFileRepository.php:100Same as Repository::createEntity, giving a ticket or a comment the id the boards' controller would.
| $class | string | |
| $data = [] | array | |
| $collection = null | null | iCollection | |
| returns | iEntity |
file()
BoardFileRepository.php:195| returns | string |
getCollection($name)
BoardFileRepository.php:58| $name | string | |
| returns | iCollection |
getCollectionByClass($entityClass, $allowChildClass)
BoardFileRepository.php:68| $entityClass | string | |
| $allowChildClass = true | bool | |
| returns | null | iCollection |
getCollections()
BoardFileRepository.php:63| returns | array |
made($entity)
BoardFileRepository.php:200an entity read from the file, or written to it, is not a new one
onCommit($commit)
BoardFileRepository.php:116Write onto the file what changed among its entities.
read()
BoardFileRepository.php:74read the file into the collections, once
| returns | void |
uid()
BoardFileRepository.php:52| returns | string |
writeComment($b, $comment)
BoardFileRepository.php:172a comment onto its ticket's discussion
| $b | KanbanBoard | |
| $comment | KanbanComment | |
| returns | void |
writeTicket($b, $ticket)
BoardFileRepository.php:148a ticket onto the file's tickets: in its place, at the end when new, gone with its discussion when removed
| $b | KanbanBoard | |
| $ticket | KanbanTicket | |
| returns | void |
__construct($collections, $filename, $board)
BoardFileRepository.php:46| $collections = [] | array | see aRepository::setCollections |
| $filename = '' | string | |
| $board = 'main' | string |
Inherited members (27)
| Properties | Declared by | Description | |
|---|---|---|---|
collections | aRepository |
| Methods | Declared by | Description | |
|---|---|---|---|
addCollection($name, $collection) | aRepository | Add collection | |
createCollection($name, $entityClass, $collectionId) | aRepository | Create and register a plain Collection for entities of $entityClass. | |
createLog($type, $origin, $collection, $data, $filters, $sorts, $limit, $offset) | aRepository | Build (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) | Repository | NOTE: this used to just return $this->hasCollection($collection); -- reporting whether the collection exists, but never actually removing it from aRepository::$collections. | |
executeQuery($query, $opts) | Repository | Find 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) | aRepository | Every 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) | aRepository | What 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) | aRepository | Log and dispatch a DELETE operation. | |
logInsert($origin, $collection, $data, $filters, $sorts, $limit, $offset) | aRepository | Log and dispatch an INSERT operation. | |
logStatus($origin, $collection, $data, $filters, $sorts, $limit, $offset) | aRepository | Log and dispatch a STATUS-change operation. | |
logUpdate($origin, $collection, $data, $filters, $sorts, $limit, $offset) | aRepository | Log 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) | aRepository | Listener 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) | aRepository | Full-text search. Not implemented at this level -- a concrete repository backed by a search-capable store should override this. | |
setCollections($cols) | aRepository | Register a batch of collections at once, e.g. | |
__wakeup() | aRepository | Register this repository's onCommit / onFetch as listeners on the global |