public static function items($value)
	{
		$cache_key = md5($value);

		if (Arr::get(self::$_cache, $cache_key))
		{
			return self::$_cache[$cache_key];
		}

		self::$_cache[$cache_key] = array(
			'load'		=> FALSE,
			'items'	=> array()
		);

		foreach (explode(' - ', $value) as $items)
		{
			$new_item = array();

			if ( ! trim($items))
				continue;

			foreach (explode("\n", $items) as $key_value)
			{
				if ( ! trim($key_value))
					continue;

				$item = explode(':', $key_value);
				$new_item[trim($item[0])] = trim($item[1]);
			}

			self::$_cache[$cache_key]['items'][] = $new_item;
		}

		if (self::$_cache[$cache_key]['items'])
		{
			self::$_cache[$cache_key]['load'] = TRUE;
		}

		return self::$_cache[$cache_key];
	}
public static function items($value)
	{
		$cache_key = md5($value);

		if (Arr::get(self::$_cache, $cache_key))
		{
			return self::$_cache[$cache_key];
		}

		self::$_cache[$cache_key] = array(
			'load'		=> FALSE,
			'items'	=> array()
		);

		foreach (explode(' - ', $value) as $items)
		{
			$new_item = array();

			if ( ! trim($items))
				continue;

			foreach (explode("\n", $items) as $key_value)
			{
				if ( ! trim($key_value))
					continue;

				$item = explode(':', $key_value);
				$new_item[trim($item[0])] = trim($item[1]);
			}

			self::$_cache[$cache_key]['items'][] = $new_item;
		}

		if (self::$_cache[$cache_key]['items'])
		{
			self::$_cache[$cache_key]['load'] = TRUE;
		}

		return self::$_cache[$cache_key];
	}
public static function items ( $ value ) { $ cache_key = md5 ( $ value ) ; if ( Arr :: get ( self :: $ _cache , $ cache_key ) ) { return self :: $ _cache [ $ cache_key ] ; } self :: $ _cache [ $ cache_key ] = array ( 'load' => FALSE , 'items' => array ( ) ) ; foreach ( explode ( ' - ' , $ value ) as $ items ) { $ new_item = array ( ) ; if ( ! trim ( $ items ) ) continue ; foreach ( explode ( "\n" , $ items ) as $ key_value ) { if ( ! trim ( $ key_value ) ) continue ; $ item = explode ( ':' , $ key_value ) ; $ new_item [ trim ( $ item [ 0 ] ) ] = trim ( $ item [ 1 ] ) ; } self :: $ _cache [ $ cache_key ] [ 'items' ] [ ] = $ new_item ; } if ( self :: $ _cache [ $ cache_key ] [ 'items' ] ) { self :: $ _cache [ $ cache_key ] [ 'load' ] = TRUE ; } return self :: $ _cache [ $ cache_key ] ; }
Transform multiples terms and elements to an multi dimentionnal array.

Example :

articles:
- ref: 54837
price: 3.5
name: Machin
- ref: 16375
price: 9.99
name: Truc

@param	string		String of elements
@return	array		Multi-dimentionnal array
Transform multiples terms and elements to an multi dimentionnal array .