Skip to content

Saving & Loading

Matthew Jordan edited this page Apr 23, 2022 · 2 revisions

Saving & Loading

By default, the MarshalTrait trait comes with support for two file formats:

  • json - This comes with the static method loadFromJson(string $fileName, ...) and the class method saveToJson(string $fileName, ...).
  • yaml - This comes with the static method loadFromYaml(string $fileName, ...) and the class method saveToYaml(string $fileName, ...).

Each contain arguments that wrap their respective encoding and decoding methods.

Clone this wiki locally