<commit_before><?php

/*
 * This file is part of the symfony framework.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

/**
 * sfStorageAutoloader is an autoloader for the service container classes.
 *
 * @package    symfony
 * @subpackage dependency_injection
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id$
 */
class sfStorageAutoloader
{
  /**
   * Registers sfStorageAutoloader as an SPL autoloader.
   */
  static public function register()
  {
    ini_set('unserialize_callback_func', 'spl_autoload_call');
    spl_autoload_register(array(new self, 'autoload'));
  }

  /**
   * Handles autoloading of classes.
   *
   * @param  string  $class  A class name.
   *
   * @return boolean Returns true if the class has been loaded
   */
  public function autoload($class)
  {
    if (0 !== strpos($class, 'sf') || strpos($class, 'Storage') === null)
    {
      return false;
    }

    require dirname(__FILE__).'/lib/'.$class.'.class.php';

    return true;
  }
}<commit_msg>Fixujem sfStorage autoloader. Review URL: http://codereview.appspot.com/4035049<commit_after><?php

/*
 * This file is part of the symfony framework.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

/**
 * sfStorageAutoloader is an autoloader for the service container classes.
 *
 * @package    symfony
 * @subpackage dependency_injection
 * @author     <NAME> <<EMAIL>>
 * @version    SVN: $Id$
 */
class sfStorageAutoloader
{
  /**
   * Registers sfStorageAutoloader as an SPL autoloader.
   */
  static public function register()
  {
    ini_set('unserialize_callback_func', 'spl_autoload_call');
    spl_autoload_register(array(new self, 'autoload'));
  }

  /**
   * Handles autoloading of classes.
   *
   * @param  string  $class  A class name.
   *
   * @return boolean Returns true if the class has been loaded
   */
  public function autoload($class)
  {
    if (0 !== strpos($class, 'sf') || strpos($class, 'Storage') === null)
    {
      return false;
    }

    $filename = dirname(__FILE__).'/lib/'.$class.'.class.php';
    if (is_file($filename) ) {
      require $filename;
      return true;
    }
    return false;
  }
}
{'fraction_non_alphanumeric': 0.12903225806451613, 'fraction_numerical': 0.003870967741935484, 'mean_word_length': 3.0452173913043477, 'pattern_counts': {'":': 0, '<': 17, '<?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': '5995302', 'n_tokens_mistral': 784, 'n_tokens_neox': 768, 'n_words': 219}