<commit_before><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

namespace Nooku\Component\Extensions;

use Nooku\Library;

/**
 * Listbox Template Helper
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package Nooku\Component\Extensions
 */
class TemplateHelperListbox extends Library\TemplateHelperListbox
{
    public function list_limits($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'list_limit',
            'attribs'	=> array()
        ));

        $options[] 	= $this->option(array('value' => '5'));
        $options[] 	= $this->option(array('value' => '10'));
        $options[] 	= $this->option(array('value' => '15'));
        $options[] 	= $this->option(array('value' => '20'));
        $options[] 	= $this->option(array('value' => '25'));
        $options[] 	= $this->option(array('value' => '30'));
        $options[] 	= $this->option(array('value' => '50'));
        $options[] 	= $this->option(array('value' => '100'));

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function timezones($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'timezone',
            'attribs'	=> array(),
            'deselect'  => true,
            'prompt'    => '- '.$this->translate('Select Time Zone').' -',
        ));

        if ($config->deselect) {
            $options[] = $this->option(array('label' => $config->prompt, 'value' => ''));
        }

        foreach (\DateTimeZone::listIdentifiers() as $identifier)
        {
            if (strpos($identifier, '/'))
            {
                list($group, $locale) = explode('/', $identifier, 2);
                $groups[$group][] = str_replace('_', ' ', $locale);
            }
        }

        $options[] = $this->option(array('label' => 'Coordinated Universal Time', 'value' => 'UTC'));
        foreach ($groups as $group => $locales)
        {
            $options[] = $this->option(array('label' => $group, 'group' => true));

            foreach ($locales as $locale) {
                $options[] = $this->option(array('label' => $locale, 'value' => str_replace(' ', '_', $group.'/'.$locale)));
            }
        }

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function error_reportings($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'error_reporting',
            'attribs'	=> array()
        ));

        $options[] 	= $this->option(array('label' => 'Server Defaults', 'value' => 0));
        $options[] 	= $this->option(array('label' => 'Development', 'value' => 1));
        $options[] 	= $this->option(array('label' => 'Production' , 'value' => 2));

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function mailers($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(<commit_msg>Use real values for debug mode error levels.<commit_after><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

namespace Nooku\Component\Extensions;

use Nooku\Library;

/**
 * Listbox Template Helper
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package Nooku\Component\Extensions
 */
class TemplateHelperListbox extends Library\TemplateHelperListbox
{
    public function list_limits($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'list_limit',
            'attribs'	=> array()
        ));

        $options[] 	= $this->option(array('value' => '5'));
        $options[] 	= $this->option(array('value' => '10'));
        $options[] 	= $this->option(array('value' => '15'));
        $options[] 	= $this->option(array('value' => '20'));
        $options[] 	= $this->option(array('value' => '25'));
        $options[] 	= $this->option(array('value' => '30'));
        $options[] 	= $this->option(array('value' => '50'));
        $options[] 	= $this->option(array('value' => '100'));

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function timezones($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'timezone',
            'attribs'	=> array(),
            'deselect'  => true,
            'prompt'    => '- '.$this->translate('Select Time Zone').' -',
        ));

        if ($config->deselect) {
            $options[] = $this->option(array('label' => $config->prompt, 'value' => ''));
        }

        foreach (\DateTimeZone::listIdentifiers() as $identifier)
        {
            if (strpos($identifier, '/'))
            {
                list($group, $locale) = explode('/', $identifier, 2);
                $groups[$group][] = str_replace('_', ' ', $locale);
            }
        }

        $options[] = $this->option(array('label' => 'Coordinated Universal Time', 'value' => 'UTC'));
        foreach ($groups as $group => $locales)
        {
            $options[] = $this->option(array('label' => $group, 'group' => true));

            foreach ($locales as $locale) {
                $options[] = $this->option(array('label' => $locale, 'value' => str_replace(' ', '_', $group.'/'.$locale)));
            }
        }

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function error_reportings($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
            'name'		=> 'error_reporting',
            'attribs'	=> array()
        ));

        $options[] 	= $this->option(array('label' => 'Server Defaults', 'value' => 0));
        $options[] 	= $this->option(array('label' => 'Development', 'value' => -1));
        $options[] 	= $this->option(array('label' => 'Production' , 'value' =>  7));

        $list = $this->optionlist(array(
            'options'   => $options,
            'name'      => $config->name,
            'selected'  => $config->selected,
            'attribs'   => $config->attribs
        ));

        return $list;
    }

    public function mailers($config = array())
    {
        $config = new Library\ObjectConfig($config);
        $config->append(array(
{'fraction_non_alphanumeric': 0.19475367882277672, 'fraction_numerical': 0.0074216250799744084, 'mean_word_length': 2.145271629778672, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '2487455', 'n_tokens_mistral': 2462, 'n_tokens_neox': 2368, 'n_words': 434}