public function readPoFile(string $file, ?resource $context = null): void
    {
        $oldEr = error_reporting(E_ALL ^ E_WARNING);
        $source = file_get_contents($file, false, $context);
        error_reporting($oldEr);
        if (false===$source) {
            throw new FileNotReadableException($file);
        }
        $this->parsePoSource($source);
    }
public function readPoFile(string $file, ?resource $context = null): void
    {
        $oldEr = error_reporting(E_ALL ^ E_WARNING);
        $source = file_get_contents($file, false, $context);
        error_reporting($oldEr);
        if (false===$source) {
            throw new FileNotReadableException($file);
        }
        $this->parsePoSource($source);
    }
public function readPoFile ( string $ file , ? resource $ context = null ) : void { $ oldEr = error_reporting ( E_ALL ^ E_WARNING ) ; $ source = file_get_contents ( $ file , false , $ context ) ; error_reporting ( $ oldEr ) ; if ( false === $ source ) { throw new FileNotReadableException ( $ file ) ; } $ this -> parsePoSource ( $ source ) ; }
Replace any current contents with entries from a file

@param string        $file    po file/stream to read
@param resource|null $context context for stream if required

@return void

@throws FileNotReadableException
Replace any current contents with entries from a file