summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-11-22 20:18:02 (GMT)
committerJon Pugh2017-11-22 20:18:02 (GMT)
commitee00dd96794d0b69ea384508a3c599c26bd1bb04 (patch)
tree52660f8795f7a2530a2b6a7574a8bfbc55f26ae6
parent2064f44d6ce0feb481e98f86599e1f347a31d9e0 (diff)
Allow contexts names with . in them.
-rw-r--r--src/Provision.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Provision.php b/src/Provision.php
index 6948249..64d6866 100644
--- a/src/Provision.php
+++ b/src/Provision.php
@@ -198,7 +198,9 @@ class Provision implements ConfigAwareInterface, ContainerAwareInterface, Logger
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*' . $name . '.yml')->in($config->get('config_path') . '/provision');
foreach ($finder as $file) {
- list($context_type, $context_name) = explode('.', $file->getFilename());
+ $context_type = substr($file->getFilename(), 0, strpos($file->getFilename(), '.'));
+ $context_name = substr($file->getFilename(), strpos($file->getFilename(), '.') + 1, strlen($file->getFilename()) - strlen($context_type) - 5);
+
$context_files[$context_name] = [
'name' => $context_name,
'type' => $context_type,