<commit_before>Installation
============

We assume you're familiar with `Composer <http://packagist.org>`_, a dependency manager for PHP.

Use following command to add the bundle to your `composer.json` and download package.

.. code-block:: bash

    $ composer require sylius/resource-bundle:0.2.*

Adding required bundles to the kernel
-------------------------------------

You just need to enable proper bundles inside the kernel.

.. code-block:: php

    <?php

    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle($this),
            new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        );
    }

To benefit from bundle services, you have to first register your class as *resource*.

Registering model as resource
-----------------------------

.. code-block:: yaml

    sylius_resources:
        resources:
            app.user:
                driver: doctrine/orm
                templates: App:User
                classes:
                    model: App\Entity\User

And... we're done!<commit_msg>Add note about override http method option<commit_after>Installation
============

We assume you're familiar with `Composer <http://packagist.org>`_, a dependency manager for PHP.

Use following command to add the bundle to your `composer.json` and download package.

.. code-block:: bash

    $ composer require sylius/resource-bundle:0.2.*

Adding required bundles to the kernel
-------------------------------------

You just need to enable proper bundles inside the kernel.

.. code-block:: php

    <?php

    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle($this),
            new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        );
    }

To benefit from bundle services, you have to first register your class as *resource*.

You also need to enable HTTP method parameter override, by calling the following method on the **Request** object.

.. code-block:: php

    use Symfony\Component\HttpFoundation\Request;

    Request::enableHttpMethodParameterOverride();

Registering model as resource
-----------------------------

.. code-block:: yaml

    sylius_resources:
        resources:
            app.user:
                driver: doctrine/orm
                templates: App:User
                classes:
                    model: App\Entity\User

And... we're done!
{'fraction_non_alphanumeric': 0.13521330441070137, 'fraction_numerical': 0.0014461315979754157, 'mean_word_length': 2.1804597701149424, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4769590', 'n_tokens_mistral': 733, 'n_tokens_neox': 685, 'n_words': 222}