src/PoHeader.php
protected function buildStructuredHeaders(): void
    {
        $this->structuredHeaders = array();
        $headers = $this->entry[PoTokens::TRANSLATED];
        $headers = ($headers === null) ? array() : $headers;
        $full = implode('', $headers);
        $headers = explode("\n", $full);
        // split on ':'
        $pattern = '/([a-z0-9\-]+):\s*(.*)/i';
        foreach ($headers as $h) {
            if (preg_match($pattern, trim($h), $matches)) {
                $this->structuredHeaders[strtolower($matches[1])] = array(
                    'key' => $matches[1],
                    'value' => $matches[2],
                );
            }
        }
    }
protected function buildStructuredHeaders(): void
    {
        $this->structuredHeaders = array();
        $headers = $this->entry[PoTokens::TRANSLATED];
        $headers = ($headers === null) ? array() : $headers;
        $full = implode('', $headers);
        $headers = explode("\n", $full);
        // split on ':'
        $pattern = '/([a-z0-9\-]+):\s*(.*)/i';
        foreach ($headers as $h) {
            if (preg_match($pattern, trim($h), $matches)) {
                $this->structuredHeaders[strtolower($matches[1])] = array(
                    'key' => $matches[1],
                    'value' => $matches[2],
                );
            }
        }
    }
protected function buildStructuredHeaders ( ) : void { $ this -> structuredHeaders = array ( ) ; $ headers = $ this -> entry [ PoTokens :: TRANSLATED ] ; $ headers = ( $ headers === null ) ? array ( ) : $ headers ; $ full = implode ( '' , $ headers ) ; $ headers = explode ( "\n" , $ full ) ; // split on ':' $ pattern = '/([a-z0-9\-]+):\s*(.*)/i' ; foreach ( $ headers as $ h ) { if ( preg_match ( $ pattern , trim ( $ h ) , $ matches ) ) { $ this -> structuredHeaders [ strtolower ( $ matches [ 1 ] ) ] = array ( 'key' => $ matches [ 1 ] , 'value' => $ matches [ 2 ] , ) ; } } }
Populate the internal structuredHeaders property with contents
of this entry's "msgstr" value.

@return void
Populate the internal structuredHeaders property with contents of this entry s msgstr value .