protected function parseFields($fields)
    {
        $fieldsArray = explode(',', $fields);
        $text = '$this'."\n";

        foreach ($fieldsArray as $field) {
            $text .= $this->prepareAdd($field, end($fieldsArray) == $field);
        }

        return $text.';';
    }
protected function parseFields($fields)
    {
        $fieldsArray = explode(',', $fields);
        $text = '$this'."\n";

        foreach ($fieldsArray as $field) {
            $text .= $this->prepareAdd($field, end($fieldsArray) == $field);
        }

        return $text.';';
    }
protected function parseFields ( $ fields ) { $ fieldsArray = explode ( ',' , $ fields ) ; $ text = '$this' . "\n" ; foreach ( $ fieldsArray as $ field ) { $ text .= $ this -> prepareAdd ( $ field , end ( $ fieldsArray ) == $ field ) ; } return $ text . ';' ; }
Parse fields from string.

@param string $fields
@return string
Parse fields from string .