class ParseFights (View source)

The ParseFights class is responsible for parsing fight details from HTML and returning an array of FightDTOs.

It uses the Symfony DomCrawler to extract relevant information from the HTML structure.

Example usage: $html = file_get_contents('event_fights.html'); $parser = new ParseFights(); $fights = $parser($html); // $fights will contain an array of FightDTOs with the parsed fight details

Methods

array
__invoke(string $html)

Parse fight details from HTML and return an array of FightDTOs.

Details

array __invoke(string $html)

Parse fight details from HTML and return an array of FightDTOs.

Parameters

string $html

Return Value

array