Download the PHP package adnanmula/keyforge-game-log-parser without Composer
On this page you can find all versions of the php package adnanmula/keyforge-game-log-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package keyforge-game-log-parser
KeyForge Game Log Parser
Parse The Crucible game logs into a structured model.
Requirements
- PHP >= 8.4
Installation
Install via Composer:
Quick start
Input formats
You can parse logs provided in 3 different formats via ParseType:
ParseType::PLAIN(default): a single string containing the full log, what you get when use tco's copy to clipboard button.ParseType::ARRAY: an array of strings containing the log messages, one per line.ParseType::HTML: the HTML markup of the log view.
Exploring results
execute() returns a Game object with the following useful members:
player1,player2(AdnanMula\KeyforgeGameLogParser\Game\Player)name,deck,isFirst,isWinner,hasConcededtimeline(AdnanMula\KeyforgeGameLogParser\Game\Timeline)
winner(): ?Playerloser(): ?Playerfirst(): ?Player(the player who took the first turn)timeline(): Timeline(combined, time-ordered events from both players)
Timelines are collections with helper methods:
filter(EventType ...$events): Collectioncount(),first(),last(),at(int $i),items(): array
Example queries:
Events
The library categorizes log messages into typed events via EventType enum:
- AMBER_OBTAINED
- AMBER_STOLEN
- CARDS_DISCARDED
- CARDS_DRAWN
- CARDS_PLAYED
- CARD_USED
- HOUSE_CHOSEN
- KEY_FORGED
- FIGHT
- REAP
- EXTRA_TURN
- TOKEN_CREATED
- PROPHECY_ACTIVATED
- PROPHECY_FULFILLED
- FATE_RESOLVED
- TIDE_RAISED
- CHAINS_ADDED
- CHAINS_REDUCED
- PLAYER_CONCEDED
- CHECK_DECLARED
All versions of keyforge-game-log-parser with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4
symfony/dom-crawler Version ^7.2 || ^8.0
symfony/css-selector Version ^7.2 || ^8.0
symfony/dom-crawler Version ^7.2 || ^8.0
symfony/css-selector Version ^7.2 || ^8.0
The package adnanmula/keyforge-game-log-parser contains the following files
Loading the files please wait ...