function LinesToArray($text)
    {
        $result = array();
        $lines = Str::SplitLines($text);
        foreach ($lines as $line)
        {
            $line = trim($line);
            if (!$line)
            {
                continue;
            }
            $pos = strpos($line, $this->separator);
            $key = $line;
            $value = '';
            if ($pos !== false)
            {
                $key = substr($line, 0, $pos);
                $value = substr($line, $pos + strlen($this->separator));
            }
            $result[trim($key)] = trim($value);
        }
        return $result;
    }
function LinesToArray($text)
    {
        $result = array();
        $lines = Str::SplitLines($text);
        foreach ($lines as $line)
        {
            $line = trim($line);
            if (!$line)
            {
                continue;
            }
            $pos = strpos($line, $this->separator);
            $key = $line;
            $value = '';
            if ($pos !== false)
            {
                $key = substr($line, 0, $pos);
                $value = substr($line, $pos + strlen($this->separator));
            }
            $result[trim($key)] = trim($value);
        }
        return $result;
    }
function LinesToArray ( $ text ) { $ result = array ( ) ; $ lines = Str :: SplitLines ( $ text ) ; foreach ( $ lines as $ line ) { $ line = trim ( $ line ) ; if ( ! $ line ) { continue ; } $ pos = strpos ( $ line , $ this -> separator ) ; $ key = $ line ; $ value = '' ; if ( $ pos !== false ) { $ key = substr ( $ line , 0 , $ pos ) ; $ value = substr ( $ line , $ pos + strlen ( $ this -> separator ) ) ; } $ result [ trim ( $ key ) ] = trim ( $ value ) ; } return $ result ; }
Fetches the lines of a text and serializes them to an array of key value pairs
@param string $text The text representation of the array
@return array Returns the array representation as associative array
Fetches the lines of a text and serializes them to an array of key value pairs