protected function _checkImageVersions($identifier, array $versions) {
		if (!isset($this->_imageVersions[$identifier])) {
			throw new RuntimeException(sprintf('No image version config found for identifier "%s"!', $identifier));
		}

		foreach ($versions as $version) {
			if (!isset($this->_imageVersions[$identifier][$version])) {
				throw new RuntimeException(sprintf('Invalid version "%s" for identifier "%s"!', $identifier, $version));
			}
		}
	}
protected function _checkImageVersions($identifier, array $versions) {
		if (!isset($this->_imageVersions[$identifier])) {
			throw new RuntimeException(sprintf('No image version config found for identifier "%s"!', $identifier));
		}

		foreach ($versions as $version) {
			if (!isset($this->_imageVersions[$identifier][$version])) {
				throw new RuntimeException(sprintf('Invalid version "%s" for identifier "%s"!', $identifier, $version));
			}
		}
	}
protected function _checkImageVersions ( $ identifier , array $ versions ) { if ( ! isset ( $ this -> _imageVersions [ $ identifier ] ) ) { throw new RuntimeException ( sprintf ( 'No image version config found for identifier "%s"!' , $ identifier ) ) ; } foreach ( $ versions as $ version ) { if ( ! isset ( $ this -> _imageVersions [ $ identifier ] [ $ version ] ) ) { throw new RuntimeException ( sprintf ( 'Invalid version "%s" for identifier "%s"!' , $ identifier , $ version ) ) ; } } }
Check that the image versions exist before doing something with them.

@throws \RuntimeException
@param string $identifier
@param array $versions
@return void
Check that the image versions exist before doing something with them .