Configuration
tilttek/reading-quests-bundletilttek_reading_quests:
store: doctrine # or memory, for tests
connection: default
measure:
unit: pages # or minutes
characters_per_minute: 1000
completion_percent: 100
timezone: UTC
shelf:
source: config # or doctrine, or service
service: null
books: {}
privacy:
member_kind: member
| Key | Default | Holds |
|---|---|---|
store | doctrine | Where the readings and the goals are kept: doctrine, or memory for tests. |
connection | default | The Doctrine DBAL connection of the readings, the goals and the books. |
measure.unit | pages | pages, the printed pages of each book, or minutes, the length of the text at the reading speed. |
measure.characters_per_minute | 1000 | The reading speed of a measure in minutes, 1 to 100 000. |
completion_percent | 100 | The furthest percent from which a book counts as finished, 1 to 100. |
timezone | UTC | The timezone the calendar year of a goal runs in, a name PHP knows. |
shelf.source | config | Where the books are found: config, doctrine or service. |
shelf.service | null | The application's shelf when the source is service. |
shelf.books | {} | The books when the source is config. |
privacy.member_kind | member | The kind of the reader a data subject of phil/privacy-bundle stands for. |
The measure
With pages, every book counted needs its page count: a position in a book without one throws InvalidReadingQuest.
With minutes, the amount of a book is the length of its document divided by the reading speed, rounded up. Both follow
the furthest percent reached, never the time a page stays on screen. A goal of an amount is counted in this unit.
The completion percent
Below 100, a book counts as finished once the reader passes that percent: for rulebooks whose index or appendices
readers seldom reach. It is given to Progress::record() for every position.
The shelf
configreadsshelf.books, keyed by the identifier of each document, asInMemoryBookShelf::fromArray()reads them:pages, null or 1 to 100 000, and up to 15facts, booleans, integers or strings of at most 100 bytes,unitreserved. An identifier keeps its dashes.shelf: books: core-rules: { pages: 320, facts: { system: dnd5e, local_author: true } } short-story: { facts: { genre: horror } }doctrinekeeps the books intilttek_reading_book; the application adds, replaces and removes them throughDbalBookShelf(The readings in the database). It needsstore: doctrine.servicenames the application's catalogue, an implementation ofTilttek\ReadingQuests\BookShelfInterface.
shelf.books is refused with another source, so that a list that would be ignored is not left in the configuration.
What the container refuses
The container does not compile, with the reason, for a book out of its bounds, a speed outside 1 to 100 000, a timezone
PHP does not know, a service source without its service, a doctrine shelf with store: memory, or a member kind
that is not 1 to 64 lowercase letters, digits, _, . or -, starting with a letter.