Version: current

# Class FormEncodedDataFormatter

Accepts form encoded strings and converts them to a valid PHP array via parse_str(). Use together with RESTfulServer to submit data via POST or PUT.

Example when using cURL on commandline:

    curl -d "Name=This is a new record" http://host/api/v1/(DataObject)
    curl -X PUT -d "Name=This is an updated record" http://host/api/v1/(DataObject)/1

  Object
  DataFormatter
  XMLDataFormatter
  FormEncodedDataFormatter

Package: sapphire\formatters
Author: Cam Spiers <camspiers at gmail dot com>
Located at sapphire/api/FormEncodedDataFormatter.php

## Methods summary

`public` | # `supportedExtensions( )` Return an array of the extensions that this data formatter supports Return an array of the extensions that this data formatter supports #### Overrides `XMLDataFormatter::supportedExtensions`
`public` | # `supportedMimeTypes( )` #### Overrides `XMLDataFormatter::supportedMimeTypes`
`public` | # `convertStringToArray( string $strData )` #### Parameters $strData string $strData HTTP Payload as string #### Overrides `XMLDataFormatter::convertStringToArray`

### Methods inherited from XMLDataFormatter

`convertDataObject()`, `convertDataObjectSet()`, `convertDataObjectWithoutHeader()`

### Methods inherited from DataFormatter

`for_extension()`, `for_extensions()`, `for_mimetype()`, `for_mimetypes()`, `getCustomAddFields()`, `getCustomFields()`, `getCustomRelations()`, `getFieldsForObj()`, `getOutputContentType()`, `getRemoveFields()`, `getTotalSize()`, `setCustomAddFields()`, `setCustomFields()`, `setCustomRelations()`, `setRemoveFields()`, `setTotalSize()`

### Methods inherited from Object

`__call()`, `__construct()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `defineMethods()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

### Properties inherited from XMLDataFormatter

`$api_base`, `$outputContentType`

### Properties inherited from DataFormatter

`$customAddFields`, `$customFields`, `$customRelations`, `$priority`, `$relationDepth`, `$removeFields`, `$totalSize`

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -