src/Processors/MapName.php
public function run()
    {
        $header = $this->rec->header();
        $messages = $header->messages;
        $instructions = $messages->instructions;
        $lines = explode("\n", $instructions);
        foreach ($lines as $line) {
            // We don't know what language the game was played in, so we try
            // every language we know.
            foreach ($this->mapTypeRegexes as $rx) {
                $matches = [];
                if (preg_match($rx, $line, $matches)) {
                    return $matches[1];
                }
            }
        }
    }
public function run()
    {
        $header = $this->rec->header();
        $messages = $header->messages;
        $instructions = $messages->instructions;
        $lines = explode("\n", $instructions);
        foreach ($lines as $line) {
            // We don't know what language the game was played in, so we try
            // every language we know.
            foreach ($this->mapTypeRegexes as $rx) {
                $matches = [];
                if (preg_match($rx, $line, $matches)) {
                    return $matches[1];
                }
            }
        }
    }
public function run ( ) { $ header = $ this -> rec -> header ( ) ; $ messages = $ header -> messages ; $ instructions = $ messages -> instructions ; $ lines = explode ( "\n" , $ instructions ) ; foreach ( $ lines as $ line ) { // We don't know what language the game was played in, so we try // every language we know. foreach ( $ this -> mapTypeRegexes as $ rx ) { $ matches = [ ] ; if ( preg_match ( $ rx , $ line , $ matches ) ) { return $ matches [ 1 ] ; } } } }
Run the processor.

@return string|null The map name, if found.
Run the processor .