widget/OpenLayers.php
protected function processSimplifiedLayers()
	{
		$processedLayers = [];
		foreach ($this->mapOptions['layers'] as $type => $options) {
			if (is_string($type)) {
				if (is_string($options)) {
                    $options = ['source' => new OL("source.$options")];
                }
				$processedLayers []= new OL("layer.$type", $options);
			} else { // Therefore $type is simply an integer array key
                $processedLayers []= $options;
            }
		}
		$this->mapOptions['layers'] = $processedLayers;
	}
protected function processSimplifiedLayers()
	{
		$processedLayers = [];
		foreach ($this->mapOptions['layers'] as $type => $options) {
			if (is_string($type)) {
				if (is_string($options)) {
                    $options = ['source' => new OL("source.$options")];
                }
				$processedLayers []= new OL("layer.$type", $options);
			} else { // Therefore $type is simply an integer array key
                $processedLayers []= $options;
            }
		}
		$this->mapOptions['layers'] = $processedLayers;
	}
Takes each key => value pair in $this->mapOptions['layers'] and checks if key is a string. In that case, a new Layer OL object will created for this layer.
Then, if the value is also a string, the corresponding Source OL object is created as well.