protected function processProperties($data)
    {

        // Will hold the properties we are sending back
        $properties = [];

        // All of these are split on space
        $items = explode(' ', $data);

        // Iterate over the items
        foreach ($items as $item) {
            // Explode and make sure we always have 2 items in the array
            list($key, $value) = array_pad(explode('=', $item, 2), 2, '');

            // Convert spaces and other character changes
            $properties[$key] = utf8_encode(str_replace(
                [
                    '\\s', // Translate spaces
                ],
                [
                    ' ',
                ],
                $value
            ));
        }

        return $properties;
    }
protected function processProperties($data)
    {

        // Will hold the properties we are sending back
        $properties = [];

        // All of these are split on space
        $items = explode(' ', $data);

        // Iterate over the items
        foreach ($items as $item) {
            // Explode and make sure we always have 2 items in the array
            list($key, $value) = array_pad(explode('=', $item, 2), 2, '');

            // Convert spaces and other character changes
            $properties[$key] = utf8_encode(str_replace(
                [
                    '\\s', // Translate spaces
                ],
                [
                    ' ',
                ],
                $value
            ));
        }

        return $properties;
    }
protected function processProperties ( $ data ) { // Will hold the properties we are sending back $ properties = [ ] ; // All of these are split on space $ items = explode ( ' ' , $ data ) ; // Iterate over the items foreach ( $ items as $ item ) { // Explode and make sure we always have 2 items in the array list ( $ key , $ value ) = array_pad ( explode ( '=' , $ item , 2 ) , 2 , '' ) ; // Convert spaces and other character changes $ properties [ $ key ] = utf8_encode ( str_replace ( [ '\\s' , // Translate spaces ] , [ ' ' , ] , $ value ) ) ; } return $ properties ; }
Process the properties of the data.

Takes data in "key1=value1 key2=value2 ..." and processes it into a usable format

@param $data

@return array
Process the properties of the data .