Services

Services are the way in which new properties are added to contexts, in fact if you wish to store information in a context, this must be done by a service. There is no other way to store data in a context. One might assume that you can just ask provision to save an additional value on a context, but this will not work, and you'll probably get very frustrated indeed!

A service may also define properties on the context as actually representing another context, so that you may access that sub context directly. For example the backup storage service stores the server to store backups on for a particular site by adding a property to that site whose value is the name of the context of the server. This means that whilst in the the site context, one can write:

<?php
d
()->backup_server; // this is the context for the backups
?>