Skip to content
Permalink
Browse files

Get one site if it has a target (#350)

  • Loading branch information...
harold20 authored and enzolutions committed May 20, 2019
1 parent db3fa22 commit 780abbe8d4ae12756d68f5ef033d420452591438
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/Utils/ConfigurationManager.php
@@ -118,8 +118,7 @@ public function readTarget($target)
$site = $exploded[0];
$environment = $exploded[1];
}
$sites = $this->getSites();
$sites = $this->getSites($site);
if (!array_key_exists($site, $sites)) {
return [];
}
@@ -387,9 +386,11 @@ private function importConfigurationFromFile($configFile)
}
/**
* @param string $target
*
* @return array
*/
public function getSites()
public function getSites($target = "*")
{
if ($this->sites) {
return $this->sites;
@@ -403,7 +404,7 @@ public function getSites()
$finder = new Finder();
$finder->in($sitesDirectories);
$finder->name("*.yml");
$finder->name($target.".yml");
foreach ($finder as $site) {
$siteName = $site->getBasename('.yml');

0 comments on commit 780abbe

Please sign in to comment.
You can’t perform that action at this time.