<commit_before>Organizing Controllers
======================

When your application starts to define too many controllers, you might want to
group them logically::

    // define controllers for a blog
    $blog = $app['controllers_factory'];
    $blog->get('/', function () {
        return 'Blog home page';
    });
    // ...

    // define controllers for a forum
    $forum = $app['controllers_factory'];
    $forum->get('/', function () {
        return 'Forum home page';
    });

    // define "global" controllers
    $app->get('/', function () {
        return 'Main home page';
    });

    $app->mount('/blog', $blog);
    $app->mount('/forum', $forum);

    // define controllers for a admin
    $app->mount('/admin', function ($admin) {
        // recursively mount
        $admin->mount('/blog', function ($user) {
            $user->get('/', function () {<commit_msg>minor #1575 A minor typo (amitmerchant1990)<commit_after>Organizing Controllers
======================

When your application starts to define too many controllers, you might want to
group them logically::

    // define controllers for a blog
    $blog = $app['controllers_factory'];
    $blog->get('/', function () {
        return 'Blog home page';
    });
    // ...

    // define controllers for a forum
    $forum = $app['controllers_factory'];
    $forum->get('/', function () {
        return 'Forum home page';
    });

    // define "global" controllers
    $app->get('/', function () {
        return 'Main home page';
    });

    $app->mount('/blog', $blog);
    $app->mount('/forum', $forum);

    // define controllers for an admin
    $app->mount('/admin', function ($admin) {
        // recursively mount
        $admin->mount('/blog', function ($user) {
            $user->get('/', function () {
{'fraction_non_alphanumeric': 0.1897607122982749, 'fraction_numerical': 0.004451864218141347, 'mean_word_length': 2.596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6620992', 'n_tokens_mistral': 523, 'n_tokens_neox': 481, 'n_words': 149}