<commit_before>Foundry Core
============

Overview
--------

The Foundry Core libraries are an on-demand framework that provides infrastructure for module loading and dependency management. With the core framework modules you only need to know the name of the module to load and it's configuration parameters.

For example, you can configure and load a Mongo database connection with the following snippets:

configuration.php
    <?php
    // Provide configuration for the database
    Core::configure('\foundry\core\database\Database',
        array(
            'service' => 'Mongo',
            'service_options' => array(
                'host'      => 'localhost',
                'db'        => 'data'
            )
        )
    );
    ?>

index.php
    <?php
    require_once('configuration.php');
    
    // Require the database library
    Core::requires('\foundry\core\database\Database');
    
    // Get the loaded module
    $database = Core::get('\foundry\core\database\Database');
    ?>

Note the configuration is seperate from usage and doesn't require the module to be loaded. This means you can configure all your modules in a single file and include it everywhere in your site but only load the modules when they're needed. Also, once a module is loaded it's cached in the framework so it only needs to be loaded once per instantiation.

Modules can also require other modules, so if you build a project management module that requires a database and authentication, you can put the necessary Core::requires('...') statements at the top of your module and when you use the module elsewhere you only need to use a single requires statement. 

Usage
-----

Include 'INSTALL_PATH/lib/_foundry_core_init.php' and consult the documentation for detailed use of the provided modules and module framework.

License
-------

The foundry core framework is licenced under the new BSD License. See the LICENSE file for details.
<commit_msg>typo in readme<commit_after>Foundry Core
============

Overview
--------

The Foundry Core libraries are an on-demand framework that provides infrastructure for module loading and dependency management. With the core framework modules you only need to know the name of the module to load and it's configuration parameters.

For example, you can configure and load a Mongo database connection with the following snippets:

configuration.php
    <?php
    // Provide configuration for the database
    Core::configure('\foundry\core\database\Database',
        array(
            'service' => 'Mongo',
            'service_options' => array(
                'host'      => 'localhost',
                'db'        => 'data'
            )
        )
    );
    ?>

index.php
    <?php
    require_once('configuration.php');
    
    // Require the database library
    Core::requires('\foundry\core\database\Database');
    
    // Get the loaded module
    $database = Core::get('\foundry\core\database\Database');
    ?>

Note the configuration is seperate from usage and doesn't require the module to be loaded. This means you can configure all your modules in a single file and include it everywhere in your site but only load the modules when they're needed. Also, once a module is loaded it's cached in the framework so it only needs to be loaded once per instantiation.

Modules can also require other modules, so if you build a project management module that requires a database and authentication, you can put the necessary Core::requires('...') statements at the top of your module and when you use the module elsewhere you only need to use a single requires statement. 

Usage
-----

Include 'INSTALL_PATH/lib/_foundry_core_init.php' and consult the documentation for detailed use of the provided modules and module framework.

License
-------

The foundry core framework is licensed under the new BSD License. See the LICENSE file for details.

{'fraction_non_alphanumeric': 0.07891365616192672, 'fraction_numerical': 0.0, 'mean_word_length': 3.1051524710830702, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '2829385', 'n_tokens_mistral': 930, 'n_tokens_neox': 905, 'n_words': 470}