/** * Check if there is no instance named $instance is type defiend in configuration file * * @param $type * @param string $instance Name of the instance to check * @return bool */ public function checkIfInstanceNotExistsInType($instance, $type) { $exists = false; foreach ($this->configurationService->get('type') as $configuraitonTypeKey => $configuraitonTypeInstances) { if ($configuraitonTypeKey == $type) { foreach ($configuraitonTypeInstances as $configuraitonTypeInstanceName => $configuraitonTypeInstanceVales) { if ($configuraitonTypeInstanceName == $instance) { $exists = true; break; } } } } return $exists; }
/** * @param string $instance Name of the instance to check * * @return boolean */ public function deployServerConfigurationExists($instance) { $deployServerData = $this->configurationService->get('type.deploy.' . $instance . '.proxy'); return is_array($deployServerData) && !!$deployServerData; }