Update creating_a_provider_class.rst

Update type hinting from Media to MediaInterface.
Update creating_a_provider_class.rst
Merge pull request #500 from desarrolla2/patch-1

Update creating_a_provider_class.rst
[documentation] improve Sphinx support
Added POST Gallery API controller
Fixed Gallery validation
Merge pull request #506 from sylvaindeloux/master

Added POST Gallery API + Fixed validation
Fixed typos
Merge pull request #508 from pborreli/typos

Fixed typos
Move serializer.xml loading

The usage of serializer.xml services can be not restrictive to REST API only.
In some cases it is usefull to serialize objects in an internal workflow, so you don't have to load FOSRestBundle nor NelmioApiDocBundle.

For example, in the Sonata commerce bundle, when you move a product from Basket to Order, each product items are serialized but not used in a REST interface.

The same modification can also be done in the following bundles:
- sonata-project\ecommerce\src\CustomerBundle\DependencyInjection\SonataCustomerExtension.php
- sonata-project\ecommerce\src\InvoiceBundle\DependencyInjection\SonataInvoiceExtension.php
- sonata-project\ecommerce\src\OrderBundle\DependencyInjection\SonataOrderExtension.php
- sonata-project\ecommerce\src\ProductBundle\DependencyInjection\SonataProductExtension.php
- sonata-project\news-bundle\DependencyInjection\SonataNewsExtension.php
- sonata-project\page-bundle\DependencyInjection\SonataPageExtension.php
- sonata-project\user-bundle\DependencyInjection\SonataUserExtension.php
Merge pull request #510 from loicolas/patch-1

Move serializer.xml loading
Add gallery/media relation APIs
Merge pull request #512 from eko/api

Add gallery/media relation APIs
Fix gallery has media API methods to fill position/enabled fields
Merge pull request #514 from eko/api

Fix gallery has media API methods to fill position/enabled fields
Fix API DoctrineORMSerializationType to be loaded only when using ORM

Fix API controllers to be loaded in ORM context only

Update position
Merge pull request #513 from eko/master

Fix API DoctrineORMSerializationType to be loaded only when using ORM
Added write medium API
Merge branch 'master' into apiWriteMedia

Conflicts:
	Controller/Api/GalleryController.php
Moved csrf_protection disabling