mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2025-04-18 18:07:12 +00:00
20 lines
396 B
PHP
20 lines
396 B
PHP
<?php
|
|
|
|
namespace BrunoFontes\Memsource;
|
|
|
|
class Helper
|
|
{
|
|
|
|
public static function saveIntoFile(string $filename, string $filecontent): void
|
|
{
|
|
try {
|
|
$f = fopen($filename, 'w+');
|
|
fwrite($f, $filecontent);
|
|
fclose($f);
|
|
} catch (\Exception $e) {
|
|
throw new \Exception("File could not be saved: {$e->error}", 1);
|
|
}
|
|
}
|
|
|
|
}
|