Merge pull request #1222 from samsonasik/docfix-formatter-namespace

doc fix: FormatterInterface namespace
This commit is contained in:
Instructor, BCIT 2018-09-15 06:30:19 -07:00 committed by GitHub
commit 521cdc9733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,12 +85,12 @@ type of response to return. If no matches are found between what the client requ
format in this array is what will be returned.
Next, you need to define the class that is used to format the array of data. This must be a fully qualified class
name, and the class must implement **CodeIgniter\\API\\FormatterInterface**. Formatters come out of the box that
name, and the class must implement **CodeIgniter\\Format\\FormatterInterface**. Formatters come out of the box that
support both JSON and XML::
public $formatters = [
'application/json' => \CodeIgniter\API\JSONFormatter::class,
'application/xml' => \CodeIgniter\API\XMLFormatter::class
'application/json' => \CodeIgniter\Format\JSONFormatter::class,
'application/xml' => \CodeIgniter\Format\XMLFormatter::class
];
So, if your request asks for JSON formatted data in an **Accept** header, the data array you pass any of the