<commit_before><?php
/**
 * Koowa Framework - http://developer.joomlatools.com/koowa
 *
 * @copyright	Copyright (C) 2007 - 2014 <NAME>ens and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		http://github.com/joomlatools/koowa for the canonical source repository
 */

/**
 * Object Bootstrapper Chain
 *
 * @author  <NAME> <https://github.com/johanjanssens>
 * @package Koowa\Library\Bootstrapper
 */
class KObjectBootstrapperChain extends KObjectBootstrapperAbstract
{
   /**
     * The bootstrapper queue
     *
     * @var	KObjectQueue
     */
    protected $_queue;

    /**
     * Constructor.
     *
     * @param KObjectConfig $config	An optional ObjectConfig object with configuration options.
     */
    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        //Create the queue
        $this->_queue = $this->getObject('lib:object.queue');
    }

    /**
     * Bootstrap the object manager
     *
     * @return void
     */
    public function bootstrap()
    {
        foreach($this->_queue as $bootstrapper)
        {
            $bootstrapper->bootstrap();

            //Remove the bootstrapper from the queue
            $this->_queue->dequeue($bootstrapper);
        }<commit_msg>re #91: Dequeue bootstrapped object after the loop finishes<commit_after><?php
/**
 * Koowa Framework - http://developer.joomlatools.com/koowa
 *
 * @copyright	Copyright (C) 2007 - 2014 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		http://github.com/joomlatools/koowa for the canonical source repository
 */

/**
 * Object Bootstrapper Chain
 *
 * @author  <NAME> <https://github.com/johanjanssens>
 * @package Koowa\Library\Bootstrapper
 */
class KObjectBootstrapperChain extends KObjectBootstrapperAbstract
{
   /**
     * The bootstrapper queue
     *
     * @var	KObjectQueue
     */
    protected $_queue;

    /**
     * Constructor.
     *
     * @param KObjectConfig $config	An optional ObjectConfig object with configuration options.
     */
    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        //Create the queue
        $this->_queue = $this->getObject('lib:object.queue');
    }

    /**
     * Bootstrap the object manager
     *
     * @return void
     */
    public function bootstrap()
    {
        $dequeue = array();
        foreach($this->_queue as $bootstrapper)
        {
            $bootstrapper->bootstrap();

            $dequeue[] = $bootstrapper;
        }

        //Remove the bootstrapper from the queue
        foreach ($dequeue as $bootstrapper) {
            $this->_queue->dequeue($bootstrapper);
        }
{'fraction_non_alphanumeric': 0.12491000719942405, 'fraction_numerical': 0.007199424046076314, 'mean_word_length': 2.482456140350877, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '2140795', 'n_tokens_mistral': 852, 'n_tokens_neox': 817, 'n_words': 186}