Zona de administracion para agregar eventos y subir imagenes

This commit is contained in:
2020-06-16 22:44:48 -04:00
parent c09165529f
commit b943a21890
32 changed files with 1228 additions and 97 deletions

View File

@ -15,4 +15,11 @@ class DataHandler {
]);
return json_decode(json_encode(Spyc::YAMLLoad($filename)));
}
public function save(string $file_name, $data) {
$filename = implode(DIRECTORY_SEPARATOR, [
$this->folder,
$file_name . '.yml'
]);
return (file_put_contents($filename, Spyc::YAMLDump($data)) !== false);
}
}