<commit_before><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * HelperHelper.
 *
 * @package    symfony
 * @subpackage helper
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id$
 */

function use_helpers()
{
  foreach (func_get_args() as $helperName)
  {
    use_helper($helperName);
  }
}

function use_helper($helperName)
{
  static $loaded = array();
  if (isset($loaded[$helperName]))
  {
    return;
  }

  if (is_readable(sfConfig::get('sf_symfony_lib_dir').'/helper/'.$helperName.'Helper.php'))
  {
    // global helper
    include_once(sfConfig::get('sf_symfony_lib_dir').'/helper/'.$helperName.'Helper.php');
  }
  else if (is_readable(sfConfig::get('sf_app_module_dir').'/'.sfContext::getInstance()->getModuleName().'/'.sfConfig::get('sf_app_module_lib_dir_name').'/helper/'.$helperName.'Helper.php'))
  {
    // current module helper
    include_once(sfConfig::get('sf_app_module_dir').'/'.sfContext::getInstance()->getModuleName().'/'.sfConfig::get('sf_app_module_lib_dir_name').'/helper/'.$helperName.'Helper.php');
  }
  else
  {
    // helper in include_path
    include_once('helper/'.$helperName.'Helper.php');
  }

  $loaded[$helperName] = true;
}<commit_msg>allow the use_helper() helper to accept more than one argument (closes #841)<commit_after><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * HelperHelper.
 *
 * @package    symfony
 * @subpackage helper
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id$
 */

/**
 * <b>DEPRECATED:</b> use use_helper() instead with the same syntax. 
 */ 
function use_helpers()
{
  if (sfConfig::get('sf_logging_active')) sfContext::getInstance()->getLogger()->err('The function "use_helpers()" is deprecated. Please use "use_helper()"'); 

  foreach (func_get_args() as $helperName)
  {
    use_helper($helperName);
  }
}

function use_helper()
{
  static $loaded = array();

  foreach (func_get_args() as $helperName)
  {
    if (isset($loaded[$helperName]))
    {
      return;
    }

    if (is_readable(sfConfig::get('sf_symfony_lib_dir').'/helper/'.$helperName.'Helper.php'))
    {
      // global helper
      include_once(sfConfig::get('sf_symfony_lib_dir').'/helper/'.$helperName.'Helper.php');
    }
    else if (is_readable(sfConfig::get('sf_app_module_dir').'/'.sfContext::getInstance()->getModuleName().'/'.sfConfig::get('sf_app_module_lib_dir_name').'/helper/'.$helperName.'Helper.php'))
    {
      // current module helper
      include_once(sfConfig::get('sf_app_module_dir').'/'.sfContext::getInstance()->getModuleName().'/'.sfConfig::get('sf_app_module_lib_dir_name').'/helper/'.$helperName.'Helper.php');
    }
    else
    {
      // helper in include_path
      include_once('helper/'.$helperName.'Helper.php');
    }

    $loaded[$helperName] = true;
  }
}
{'fraction_non_alphanumeric': 0.17737789203084833, 'fraction_numerical': 0.006105398457583547, 'mean_word_length': 3.9967897271268056, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '1524508', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1030, 'n_words': 187}