<commit_before>Usage
=====

This chapter describes how to use Silex.

Installation
------------

If you want to get started fast, `download`_ Silex as an archive and extract
it, you should have the following directory structure:

.. code-block:: text

    ├── composer.json
    ├── composer.lock
    ├── vendor
    │   └── ...
    └── web
        └── index.php

If you want more flexibility, use Composer instead. Create a
``composer.json``:

.. code-block:: json

    {
        "require": {
            "silex/silex": "1.0.*"
        }
    }

And run Composer to install Silex and all its dependencies:

.. code-block:: bash

    $ curl -s http://getcomposer.org/installer | php
    $ composer.phar install

Upgrading
---------

Upgrading Silex to the latest version is as easy as running the ``update``
command::

    $ composer.phar update

Bootstrap
---------

To bootstrap Silex, all you need to do is require the ``vendor/autoload.php``
file and create an instance of ``Silex\Application``. After your controller
definitions, call the ``run`` method on your application::

    // web/index.php

    require_once __DIR__.'/../vendor/autoload.php';

    $app = new Silex\Application();

    // definitions

    $app->run();

Then, you have to configure your web server (read the dedicated chapter for
more information).<commit_msg>added missing php command<commit_after>Usage
=====

This chapter describes how to use Silex.

Installation
------------

If you want to get started fast, `download`_ Silex as an archive and extract
it, you should have the following directory structure:

.. code-block:: text

    ├── composer.json
    ├── composer.lock
    ├── vendor
    │   └── ...
    └── web
        └── index.php

If you want more flexibility, use Composer instead. Create a
``composer.json``:

.. code-block:: json

    {
        "require": {
            "silex/silex": "1.0.*"
        }
    }

And run Composer to install Silex and all its dependencies:

.. code-block:: bash

    $ curl -s http://getcomposer.org/installer | php
    $ php composer.phar install

Upgrading
---------

Upgrading Silex to the latest version is as easy as running the ``update``
command::

    $ php composer.phar update

Bootstrap
---------

To bootstrap Silex, all you need to do is require the ``vendor/autoload.php``
file and create an instance of ``Silex\Application``. After your controller
definitions, call the ``run`` method on your application::

    // web/index.php

    require_once __DIR__.'/../vendor/autoload.php';

    $app = new Silex\Application();

    // definitions

    $app->run();

Then, you have to configure your web server (read the dedicated chapter for
more information).
{'fraction_non_alphanumeric': 0.13308550185873605, 'fraction_numerical': 0.001486988847583643, 'mean_word_length': 2.6463414634146343, 'pattern_counts': {'":': 4, '<': 3, '<?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': '3772511', 'n_tokens_mistral': 823, 'n_tokens_neox': 807, 'n_words': 304}