public function read($filePath)
    {
        $this->rawEntries = array();
        $this->currentEntry = $this->createNewEntryAsArray();
        $this->state = null;
        $this->justNewEntry = false;

        $handle = $this->openFile($filePath);
        while (!feof($handle)) {
            $line = trim(fgets($handle));
            $this->processLine($line);
        }
        fclose($handle);

        $this->addFinalEntry();
        $this->prepareResults();

        return $this->entriesAsArrays;
    }
public function read($filePath)
    {
        $this->rawEntries = array();
        $this->currentEntry = $this->createNewEntryAsArray();
        $this->state = null;
        $this->justNewEntry = false;

        $handle = $this->openFile($filePath);
        while (!feof($handle)) {
            $line = trim(fgets($handle));
            $this->processLine($line);
        }
        fclose($handle);

        $this->addFinalEntry();
        $this->prepareResults();

        return $this->entriesAsArrays;
    }
public function read ( $ filePath ) { $ this -> rawEntries = array ( ) ; $ this -> currentEntry = $ this -> createNewEntryAsArray ( ) ; $ this -> state = null ; $ this -> justNewEntry = false ; $ handle = $ this -> openFile ( $ filePath ) ; while ( ! feof ( $ handle ) ) { $ line = trim ( fgets ( $ handle ) ) ; $ this -> processLine ( $ line ) ; } fclose ( $ handle ) ; $ this -> addFinalEntry ( ) ; $ this -> prepareResults ( ) ; return $ this -> entriesAsArrays ; }
Reads and parses strings in a .po file.

return An array of entries located in the file:
Format: array(
'msgid'     => <string> ID of the message.
'msgctxt'   => <string> Message context.
'msgstr'    => <string> Message translation.
'tcomment'  => <string> Comment from translator.
'ccomment'  => <string> Extracted comments from code.
'references' => <array> Location of string in code.
'obsolete'  => <bool> Is the message obsolete?
'fuzzy'     => <bool> Is the message "fuzzy"?
'flags'     => <array> Flags of the entry. Internal usage.
)

#~ (old entry)
# @ default
#, fuzzy
#~ msgid "Editar datos"
#~ msgstr "editar dades"

@param string $filePath
@throws \Exception
@return array|bool
Reads and parses strings in a . po file .