src/FileLoader.php
public function getArrayFromLines(array $lines) {
		$array = [];
		$map = [];

		$i = 1;
		foreach ($lines as $line) {
			if ($this->processor->isEmptyLine($line)) {
				$map[$i] = ['type' => 'empty'];
			} elseif ($this->processor->isCommentLine($line)) {
				$map[$i] = ['type' => 'comment', 'value' => $line];
			} else {
				$keyValue = explode('=', $line, 2);
				if (count($keyValue) < 2) {
					throw new InvalidLineException('Invalid line in configuration file');
				}
				list($key, $value) = $keyValue;

				$key = trim($key);

				$array[$key] = $this->processValue($value);
				$map[$i] = ['type' => 'value', 'key' => $key];
				$map[$i]['info'] = $this->mapInfoForValue($value);
			}

			$i++;
		}

		return [$array,$map];
	}
public function getArrayFromLines(array $lines) {
		$array = [];
		$map = [];

		$i = 1;
		foreach ($lines as $line) {
			if ($this->processor->isEmptyLine($line)) {
				$map[$i] = ['type' => 'empty'];
			} elseif ($this->processor->isCommentLine($line)) {
				$map[$i] = ['type' => 'comment', 'value' => $line];
			} else {
				$keyValue = explode('=', $line, 2);
				if (count($keyValue) < 2) {
					throw new InvalidLineException('Invalid line in configuration file');
				}
				list($key, $value) = $keyValue;

				$key = trim($key);

				$array[$key] = $this->processValue($value);
				$map[$i] = ['type' => 'value', 'key' => $key];
				$map[$i]['info'] = $this->mapInfoForValue($value);
			}

			$i++;
		}

		return [$array,$map];
	}
public function getArrayFromLines ( array $ lines ) { $ array = [ ] ; $ map = [ ] ; $ i = 1 ; foreach ( $ lines as $ line ) { if ( $ this -> processor -> isEmptyLine ( $ line ) ) { $ map [ $ i ] = [ 'type' => 'empty' ] ; } elseif ( $ this -> processor -> isCommentLine ( $ line ) ) { $ map [ $ i ] = [ 'type' => 'comment' , 'value' => $ line ] ; } else { $ keyValue = explode ( '=' , $ line , 2 ) ; if ( count ( $ keyValue ) < 2 ) { throw new InvalidLineException ( 'Invalid line in configuration file' ) ; } list ( $ key , $ value ) = $ keyValue ; $ key = trim ( $ key ) ; $ array [ $ key ] = $ this -> processValue ( $ value ) ; $ map [ $ i ] = [ 'type' => 'value' , 'key' => $ key ] ; $ map [ $ i ] [ 'info' ] = $ this -> mapInfoForValue ( $ value ) ; } $ i ++ ; } return [ $ array , $ map ] ; }
Creates value and map array from string lines

@param array $lines
@return array
@throws InvalidLineException
Creates value and map array from string lines