protected function parseOptionString($string)
	{
		// Use the first "?" as an alias for the "optional" option
		$string = preg_replace('(^\\?)', ';optional', $string);

		$options = [];
		foreach (preg_split('#;+#', $string, -1, PREG_SPLIT_NO_EMPTY) as $pair)
		{
			$pos = strpos($pair, '=');
			if ($pos === false)
			{
				// Options with no value are set to true, e.g. {FOO;useContent}
				$k = $pair;
				$v = true;
			}
			else
			{
				$k = substr($pair, 0, $pos);
				$v = substr($pair, 1 + $pos);
			}

			$options[$k] = $v;
		}

		return $options;
	}
protected function parseOptionString($string)
	{
		// Use the first "?" as an alias for the "optional" option
		$string = preg_replace('(^\\?)', ';optional', $string);

		$options = [];
		foreach (preg_split('#;+#', $string, -1, PREG_SPLIT_NO_EMPTY) as $pair)
		{
			$pos = strpos($pair, '=');
			if ($pos === false)
			{
				// Options with no value are set to true, e.g. {FOO;useContent}
				$k = $pair;
				$v = true;
			}
			else
			{
				$k = substr($pair, 0, $pos);
				$v = substr($pair, 1 + $pos);
			}

			$options[$k] = $v;
		}

		return $options;
	}
protected function parseOptionString ( $ string ) { // Use the first "?" as an alias for the "optional" option $ string = preg_replace ( '(^\\?)' , ';optional' , $ string ) ; $ options = [ ] ; foreach ( preg_split ( '#;+#' , $ string , - 1 , PREG_SPLIT_NO_EMPTY ) as $ pair ) { $ pos = strpos ( $ pair , '=' ) ; if ( $ pos === false ) { // Options with no value are set to true, e.g. {FOO;useContent} $ k = $ pair ; $ v = true ; } else { $ k = substr ( $ pair , 0 , $ pos ) ; $ v = substr ( $ pair , 1 + $ pos ) ; } $ options [ $ k ] = $ v ; } return $ options ; }
Parse the option string into an associative array

@param  string $string Serialized options
@return array          Associative array of options
Parse the option string into an associative array