webCOMAND

repo Configuration

The repository configuration defines how to connect to the default repository.

  • io_comand_repo
    • repo
      • auth - Associative array of options used to determine which COMAND User to use when connecting to the repository.  The authorizations associated with the specified user will be applied, which may restrict access.  Only the User OID (recommended) or Username is required.
        • username - Username of the User to connect with.  Will be ignored if oid is specified.
        • oid - OID of the User to connect with.
      • event_log - The event log level to use when logging to the repository event log.  Only events of the specified type or lower will be logged.  The following values are valid.
        • enabled - TRUE to log events to a file.
        • filename - Fully qualified path where to log the file.  Format parameters understood by PHP date() can be specified after a percent (%) symbol.  See example below.
        • formatter - An associative array with parameters recognized by an event log formatter.  In addition, trace may be set to TRUE to include a stack trace logged after exceptions.  See example below.
        • level - The maximum event level to report.  All levels greater than the specified level will not be logged.
          • 1 - Emergency: Errors that require immediate attention and may indicate detected or imminent data loss.
          • 2 - Alert: Errors that require immediate attention in order to correct a bad configuration or resource issue.
          • 3 - Critical: Non-recoverable errors that require shutdown.
          • 4 - Error: An high-level error occurred that should be fixed, but will not prevent the system from operating properly.
          • 5 - Warning: Something unusual or unexpected occurred that may require attention or action.
          • 6 - Notice: Something of note occurred, but may not require any action.
          • 7 - Info (default): Some information that may be useful, but does not require attention or note under normal operation.
          • 8 - Verbose: Detailed information that is useful for monitoring and troubleshooting a process.
          • 9 - Debug: Detailed technical information that is useful for debugging and troubleshooting a process at the code-level.
      • preload_content_types - Which content types to load immediately upon connection.
        • 1 - All Content Types: Load all content types in batch upon connection so they do not need to be loaded individually on demand.  This will increase connection time and is not recommended except, but may be useful in some cases where a repository has very few content types.
        • 2 - Minimum (default): Only load the core content types required for proper function.  All others will be loaded on demand.  This will produce the fastest connection time, but may be slower overall because of subsequent content type loads.
        • 3 - Common: Load the content types typically required for common operation.  Slightly slower connection time, but may reduce overall process time by loading the common content types in a batch.
      • url - The URL of a local or remote repository.  comand://localhost/ is the default, and currently only supported option.

To override defaults, add the following section to the COMAND Configuration.

<?php
/**
 * COMAND Configuration.
 */
$config = [
    'io_comand_repo' => [
        'repo' => [
            'auth' => [
                'oid' => 123
            ]
            'preload_content_types' => 3,
            'event_log' => [
                'enabled' => TRUE,
                'filename' => COMAND_HOME.'/files/logs/webcomand/webcomand_%Y-%m%d.log',
                'formatter' => ['traces' => FALSE],
                'level' => 6
            ]
        ]
    ]
];