GitHubRepository
MMO\git\helpers · 1 symbol · generated 5 Oct 2026
GitHubRepository
GitHubRepository.php:44A GitHub project, or a repository's issues, as a repository of mmo.client's kanban entities: one KanbanBoard, its KanbanTickets, and their KanbanComments. mmo.client's KanbanController reads and saves a board through it as it does through a JsonRepository.
- Namespace
MMO\git\helpers- Extends
- Repository
Index
| LOOKS | ||
| api | ||
| board | ||
| cacheTtl | ||
| discussed | ||
| github | ||
| looks | ||
| made | ||
| project | ||
| repository | ||
| snapshot | ||
| source | ||
| applyLooks($data) | ||
| cacheFile() | ||
| collectionOf($class) | ||
| commentData($ticket, $comment) | ||
| createEntity($class, $data, $collection) | Same as Repository::createEntity, but a new entity's id is a placeholder until GitHub gives it its own: a number could be an issue's already. | |
| discuss($ticket) | Read a ticket's comments, once. | |
| discussion($ticket) | ||
| dropCache() | Forget what GitHub answered: the next request reads it again. | |
| executeQuery($query, $opts) | Same as Repository::executeQuery, reading first the comments of the tickets a query of comments names. | |
| fetch() | Read the board from GitHub, and keep what it answered for the next requests. | |
| fromCache() | ||
| getApi() | ||
| getCollection($name) | ||
| getCollectionByClass($entityClass, $allowChildClass) | ||
| getCollections() | ||
| getSource() | ||
| getViewer() | ||
| isWritable() | ||
| keepLooks($data) | Keep what the board's data gives that GitHub does not keep: the icons, the colours of aBoard::keepsColor, and a status's type when it is not the one the board works out. | |
| made($entity) | an entity read from GitHub is not a new one | |
| onCommit($commit) | Write to GitHub the changes of its entities: the board's and the tickets' first, then the comments'. | |
| read() | Read the board from GitHub into its collections, once. | |
| readLooks() | ||
| reload() | Forget the board as it was read, and what GitHub answered: what is asked next is read from GitHub again (what it kept of a change, the ids it gave). | |
| remember($after) | ||
| saveBoard() | Save the board and its tickets as they are now: the board's save() compares them with $snapshot. | |
| saveComment($comment, $removed) | Add, change or delete a comment on GitHub. | |
| setApi($api) | Talk to GitHub through another client than GitHubAPI::Shared(): before anything is read. | |
| uid() | ||
| __construct($collections, $project, $repository, $board, $looks, $cacheTtl) |
Constants1
LOOKS
Properties11
api
board
- Type
- string
cacheTtl
- Type
- int
discussed
- Type
- array
github
looks
made
- Type
- int
project
repository
snapshot
source
Methods30
applyLooks($data)
GitHubRepository.php:466cacheFile()
GitHubRepository.php:370collectionOf($class)
GitHubRepository.php:237| $class | string | |
| returns | iCollection | |
| throws | when it has no collection of $class |
commentData($ticket, $comment)
GitHubRepository.php:217| $ticket | string | |
| $comment | array | as IssueDiscussion::toComment gives it |
| returns | array | the properties of a KanbanComment |
createEntity($class, $data, $collection)
GitHubRepository.php:245Same as Repository::createEntity, but a new entity's id is a placeholder until GitHub gives it its own: a number could be an issue's already.
| $class | string | |
| $data = [] | array | |
| $collection = null | null | iCollection | |
| returns | iEntity |
discuss($ticket)
GitHubRepository.php:200Read a ticket's comments, once.
discussion($ticket)
GitHubRepository.php:363| $ticket | string | |
| returns | IssueDiscussion | its discussion |
| throws | when it has none (a draft) |
dropCache()
GitHubRepository.php:416Forget what GitHub answered: the next request reads it again.
| returns | void |
executeQuery($query, $opts)
GitHubRepository.php:165Same as Repository::executeQuery, reading first the comments of the tickets a query of comments names.
fetch()
GitHubRepository.php:389Read the board from GitHub, and keep what it answered for the next requests.
| returns | array | the board's data, as GitHub has it |
fromCache()
GitHubRepository.php:376getApi()
GitHubRepository.php:112| returns | GitHubAPI |
getCollection($name)
GitHubRepository.php:144| $name | string | |
| returns | iCollection |
getCollectionByClass($entityClass, $allowChildClass)
GitHubRepository.php:154| $entityClass | string | |
| $allowChildClass = true | bool | |
| returns | null | iCollection |
getCollections()
GitHubRepository.php:149| returns | array |
getSource()
GitHubRepository.php:124| returns | aBoard | the board GitHub has: a project's, or a repository's issues |
getViewer()
GitHubRepository.php:135isWritable()
GitHubRepository.php:130| returns | bool | whether it can write: with a token |
keepLooks($data)
GitHubRepository.php:438Keep what the board's data gives that GitHub does not keep: the icons, the colours of aBoard::keepsColor, and a status's type when it is not the one the board works out.
made($entity)
GitHubRepository.php:226an entity read from GitHub is not a new one
onCommit($commit)
GitHubRepository.php:258Write to GitHub the changes of its entities: the board's and the tickets' first, then the comments'.
read()
GitHubRepository.php:181Read the board from GitHub into its collections, once.
| returns | void | |
| throws | when GitHub refuses |
readLooks()
GitHubRepository.php:426reload()
GitHubRepository.php:406Forget the board as it was read, and what GitHub answered: what is asked next is read from GitHub again (what it kept of a change, the ids it gave). The entities held are dropped from their collections, unsaved changes with them.
| returns | void |
remember($after)
GitHubRepository.php:322saveBoard()
GitHubRepository.php:277Save the board and its tickets as they are now: the board's save() compares them with $snapshot.
| returns | array | true> the tickets removed |
saveComment($comment, $removed)
GitHubRepository.php:336Add, change or delete a comment on GitHub.
| $comment | KanbanComment | |
| $removed | array | |
| returns | void |
setApi($api)
GitHubRepository.php:117Talk to GitHub through another client than GitHubAPI::Shared(): before anything is read.
uid()
GitHubRepository.php:108| returns | string |
__construct($collections, $project, $repository, $board, $looks, $cacheTtl)
GitHubRepository.php:99Inherited members (26)
| 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. | |
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 |