Configuration file

The [OFMSetup](NoreSources/OFM/OFMSetup) helper class can create a OFM manager from a structured text file description.

Structure

  • development (boolean) Development mode flag
  • mapping-driver(object)
    • class (string) Mapping driver class name. The default value is [ReflectionDriver](NoreSources/Persistence/Mapping/Driver/ReflectionDriver)
    • paths (array, string) Class mapping metadata director(y|ies)
    • ... (mixd) Any other class constructor parameter
  • class-metadata (object)
    • class ClassMetadata class name £ factory ClassMetadataFactory class name
  • filesystem (object)
    • base-path (string) Root directory of all object files.
    • directory-mapper Directory mapping strategy class name
    • filename-mapper File name mapping strategy class name
    • media-type (string) Object file media type

Paths

By default, non-absolute paths are relative to the configuration file directory. An alternative working directory can be specified when invoking OFMSetup functions.

Variables

Supported file formats

Any structured text format supported by NoreSources Data SerializationManager and able tor represent a multi-dimensional dictionary is accepted.

JSON and YAML are the most relevant file formats.