summaryrefslogtreecommitdiffstats
path: root/provision.inc
diff options
context:
space:
mode:
authorSteven Jones2012-04-29 06:57:08 (GMT)
committerSteven Jones2012-04-29 06:57:45 (GMT)
commitd7a6b5d4bf7854cebae42c7d52116f09e0e2a3bd (patch)
treed75646b99db4f4aebf52ba998fb0c4c7e3af4fa1 /provision.inc
parent568047de02e4896f7876bee6ea268e5becc60313 (diff)
Get the context factory working
Diffstat (limited to 'provision.inc')
-rw-r--r--provision.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/provision.inc b/provision.inc
index 6212c01..ceb68f7 100644
--- a/provision.inc
+++ b/provision.inc
@@ -741,6 +741,19 @@ function provision_version_parts() {
return explode('.', $version);
}
+/**
+ * Normalise a context name, ensuring that it starts with one '@'.
+ *
+ * @param $name
+ * The context name to normalise.
+ *
+ * @return
+ * The normalised context name.
+ */
+function provision_normalise_context_name($name) {
+ return '@' . ltrim($name, '@');
+}
+
// Base class for provision exceptions.
class provisionException extends Exception {