GitHubRepository
MMO\git\helpers · 1 symbol · generated 27 Oct 2026
GitHubRepository
GitHubRepository.php:45A 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 | ||
| unlisted | ||
| unremoved | ||
| 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() | ||
| isGone($ticket, $locator) | ||
| 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. | |
| locator($ticket) | ||
| made($entity) | an entity read from GitHub is not a new one | |
| makesIssues() | ||
| 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() | ||
| ref($ticket, $url) | What a ticket is called on GitHub, and where it is: what mmo.git's BoardSync writes on the local ticket it is paired with, for a person holding GitHub's number to find it (the local and the remote … | |
| 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) | ||
| renamed($draft, $issue) | A draft is an issue now: its ticket takes the issue's number, in what was read and in its collection. | |
| 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. | |
| toIssue($ticket) | Make an issue of a project's draft, in $repository, for it to have a discussion. | |
| uid() | ||
| __construct($collections, $project, $repository, $board, $looks, $cacheTtl) |
Constants1
LOOKS
Properties13
api
board
- Type
- string
cacheTtl
- Type
- int
discussed
- Type
- array
github
looks
made
- Type
- int
project
repository
snapshot
source
unlisted
- Type
- array
unremoved
- Type
- array
Methods36
applyLooks($data)
GitHubRepository.php:588cacheFile()
GitHubRepository.php:482collectionOf($class)
GitHubRepository.php:252| $class | string | |
| returns | iCollection | |
| throws | when it has no collection of $class |
commentData($ticket, $comment)
GitHubRepository.php:232| $ticket | string | |
| $comment | array | as IssueDiscussion::toComment gives it |
| returns | array | the properties of a KanbanComment |
createEntity($class, $data, $collection)
GitHubRepository.php:260Same 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:215Read a ticket's comments, once.
discussion($ticket)
GitHubRepository.php:475| $ticket | string | |
| returns | IssueDiscussion | its discussion |
| throws | when it has none (a draft) |
dropCache()
GitHubRepository.php:538Forget what GitHub answered: the next request reads it again.
| returns | void |
executeQuery($query, $opts)
GitHubRepository.php:180Same as Repository::executeQuery, reading first the comments of the tickets a query of comments names.
fetch()
GitHubRepository.php:501Read 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:488getApi()
GitHubRepository.php:127| returns | GitHubAPI |
getCollection($name)
GitHubRepository.php:159| $name | string | |
| returns | iCollection |
getCollectionByClass($entityClass, $allowChildClass)
GitHubRepository.php:169| $entityClass | string | |
| $allowChildClass = true | bool | |
| returns | null | iCollection |
getCollections()
GitHubRepository.php:164| returns | array |
getSource()
GitHubRepository.php:139| returns | aBoard | the board GitHub has: a project's, or a repository's issues |
getViewer()
GitHubRepository.php:150isGone($ticket, $locator)
GitHubRepository.php:404isWritable()
GitHubRepository.php:145| returns | bool | whether it can write: with a token |
keepLooks($data)
GitHubRepository.php:560Keep 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.
locator($ticket)
GitHubRepository.php:394| $ticket | string | a ticket's id |
| returns | null | string | what finds it on GitHub without listing the board (aBoard::locator): to keep while it is listed, for isGone to ask once it is not |
made($entity)
GitHubRepository.php:241an entity read from GitHub is not a new one
makesIssues()
GitHubRepository.php:425| returns | bool | whether drafts can become issues (toIssue): a project's, given a $repository |
onCommit($commit)
GitHubRepository.php:273Write to GitHub the changes of its entities: the board's and the tickets' first, then the comments'.
read()
GitHubRepository.php:196Read the board from GitHub into its collections, once.
| returns | void | |
| throws | when GitHub refuses |
readLooks()
GitHubRepository.php:548ref($ticket, $url)
GitHubRepository.php:417What a ticket is called on GitHub, and where it is: what mmo.git's BoardSync writes on the local ticket it is paired with, for a person holding GitHub's number to find it (the local and the remote ids differ).
| $ticket | string | a ticket's id: an issue's number, or a project's draft (d<n>) |
| $url = null | null | string | its page, when the board read gives one |
| returns | array | string, url: ?string} gh#255 and the issue's page, or gh draft and the project's |
reload()
GitHubRepository.php:528Forget 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:353renamed($draft, $issue)
GitHubRepository.php:453A draft is an issue now: its ticket takes the issue's number, in what was read and in its collection. Not read again: GitHub lists the drafts made a moment before late, and a board read without them says they were removed.
saveBoard()
GitHubRepository.php:292Save 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:367Add, change or delete a comment on GitHub.
| $comment | KanbanComment | |
| $removed | array | |
| returns | void |
setApi($api)
GitHubRepository.php:132Talk to GitHub through another client than GitHubAPI::Shared(): before anything is read.
toIssue($ticket)
GitHubRepository.php:436Make an issue of a project's draft, in $repository, for it to have a discussion. Its entities are read again the next time they are asked for (reload): changes not committed are lost.
| $ticket | string | the draft's id (d<n>); a ticket already an issue keeps its id |
| returns | string | the ticket's id now: its issue's number |
| throws | when it cannot (makesIssues), the ticket is not the board's, or GitHub refuses |
uid()
GitHubRepository.php:123| returns | string |
__construct($collections, $project, $repository, $board, $looks, $cacheTtl)
GitHubRepository.php:114Inherited 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 (?search[type]=$text of RepositoryController::routeGet), on top of the query's own filters, its sort and its page. | |
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 |