PHP Classes

File: docs/05-instances.md

Recommend this page to a friend!
  Classes of Scott Arciszewski   Chronicle   docs/05-instances.md   Download  
File: docs/05-instances.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Chronicle
Append arbitrary data to a storage container
Author: By
Last change:
Date: 1 year ago
Size: 759 bytes
 

Contents

Class file image Download

Concurrent Instances

Since version 1.1.0, Chronicle allows multiple instances to be installed in the same database and document root. This is an optional feature.

To set up your instance, add an entry to local/settings.json like so:

{
    "instances": {
        "instance_name": "table_prefix"
    }
}

Next, run the following:

php bin/make-tables.php -i instance_name
# Equivalent:
# php bin/make-tables.php --instance=instance_name

You can then run the other scripts (create-client.php, etc.) with the -i flag.

Finally, when making HTTP requests with the REST API, add the instance query parameter to the request URI.

/chronicle/publish?instance=instance_name
/chronicle/export?instance=instance_name