webCOMAND

repo::get_system_property()

Get information about the repository, such as the repository storage version and what features it supports. Repositories typically have many system properties. A few common examples are listed below.

  • repo.version - Repository version number (X.xx.YYMMDD)
  • repo.capability.query - Queries are supported (TRUE/FALSE).
  • repo.capability.query.cpath - cPath is supported (TRUE/FALSE).
  • repo.capability.query.cql - cQL is supported (TRUE/FALSE).
  • repo.capability.query.cquery - cQuery is supported (TRUE/FALSE).
  • repo.capability.version_control - Version control is supported (TRUE/FALSE).
  • repo.capability.workflow - Workflow features are supported (TRUE/FALSE).

Prototype

string get_system_property(string $property_name)

Parameters

  • property_name - The name of the property to retrieve the value for.

Return

The value of the property is returned as a string.  If the property does not exist, a COMAND Exception is thrown.

Example

$version = $repo->system_property('repo.version');
echo("Repository version $version\n");

Many other system properties exist, and may be different from repository to repository. To learn more about the system properties available in a specific repository, query from SystemProperty content type using a standard API query.

$props = $repo->get('FROM SystemProperty');
foreach($props as $prop) {
	echo("$prop->Identifier, $prop->Value\n");
}