protected function readConfigurationFile($file)
    {
        if (! file_exists($file)) {
            throw InvalidSetupException::confNotFound($file);
        }
        if (! $json = file_get_contents($file)) {
            throw InvalidSetupException::confNotReadable($file);
        }
        if (! $config = json_decode($json)) {
            throw InvalidSetupException::confNotJson($file);
        }
        sodium_memzero($json);
        return $config;
    }
protected function readConfigurationFile($file)
    {
        if (! file_exists($file)) {
            throw InvalidSetupException::confNotFound($file);
        }
        if (! $json = file_get_contents($file)) {
            throw InvalidSetupException::confNotReadable($file);
        }
        if (! $config = json_decode($json)) {
            throw InvalidSetupException::confNotJson($file);
        }
        sodium_memzero($json);
        return $config;
    }
protected function readConfigurationFile ( $ file ) { if ( ! file_exists ( $ file ) ) { throw InvalidSetupException :: confNotFound ( $ file ) ; } if ( ! $ json = file_get_contents ( $ file ) ) { throw InvalidSetupException :: confNotReadable ( $ file ) ; } if ( ! $ config = json_decode ( $ json ) ) { throw InvalidSetupException :: confNotJson ( $ file ) ; } sodium_memzero ( $ json ) ; return $ config ; }
Reads a JSON configuration and extracts info.

@param string $file The path on the filesystem to the configuration file.

@throws InvalidSetupException

@return \stdClass Object with the extracted configuration info.
Reads a JSON configuration and extracts info .