<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */
 
  uses('ClassDoc', 'MethodDoc');

  define('ST_INITIAL',            'initial');
  define('ST_CLASS_BODY',         'classbody');
  define('ST_USES',               'uses');
  define('ST_IMPLEMENTS',         'implements');
  define('ST_CLASS',              'class');
  define('ST_CLASS_VAR',          'classvar');
  define('ST_VARIABLE_VALUE',     'variablevalue');
  define('ST_FUNCTION',           'function');
  define('ST_FUNCTION_ARGUMENTS', 'functionarguments');
  define('ST_ARGUMENT_VALUE',     'argumentvalue');
  define('ST_FUNCTION_BODY',      'functionbody');
  define('ST_DEFINE',             'define');
  define('ST_DEFINE_VALUE',       'definevalue');
  
  define('T_USES',                0x1000);
  define('T_IMPLEMENTS',          0x1001);
  define('T_DEFINE',              0x1002);
  
  /**
   * Iterates over a collection of classes, parsing them as going along.
   *
   * @purpose  Iterator
   */
  class ClassIterator extends Object {
    var
      $classes = array(),
      $_key    = NULL;
    
    /**
     * Constructor
     *
     * @access  public
     * @param   string[] classes
     */
    function __construct($classes= array()) {
      $this->classes= array_flip($classes);
    }

    /**
     * Finds a class by a given class name
     *
     * @access  protected
     * @param   string classname
     * @return  string filename
     */
    function findClass($classname) {
      $filename= str_replace('.', DIRECTORY_SEPARATOR, $classname).'.class.php';
      foreach (array_unique(explode(PATH_SEPARATOR, ini_get('include_path'))) as $dir) {<commit_msg>- Add rewind() method<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */
 
  uses('ClassDoc', 'MethodDoc');

  define('ST_INITIAL',            'initial');
  define('ST_CLASS_BODY',         'classbody');
  define('ST_USES',               'uses');
  define('ST_IMPLEMENTS',         'implements');
  define('ST_CLASS',              'class');
  define('ST_CLASS_VAR',          'classvar');
  define('ST_VARIABLE_VALUE',     'variablevalue');
  define('ST_FUNCTION',           'function');
  define('ST_FUNCTION_ARGUMENTS', 'functionarguments');
  define('ST_ARGUMENT_VALUE',     'argumentvalue');
  define('ST_FUNCTION_BODY',      'functionbody');
  define('ST_DEFINE',             'define');
  define('ST_DEFINE_VALUE',       'definevalue');
  
  define('T_USES',                0x1000);
  define('T_IMPLEMENTS',          0x1001);
  define('T_DEFINE',              0x1002);
  
  /**
   * Iterates over a collection of classes, parsing them as going along.
   *
   * @purpose  Iterator
   */
  class ClassIterator extends Object {
    var
      $classes = array(),
      $_key    = NULL;
    
    /**
     * Constructor
     *
     * @access  public
     * @param   string[] classes
     */
    function __construct($classes= array()) {
      $this->classes= array_flip($classes);
    }
    
    /**
     * Rewinds this iterator
     *
     * @access  public
     */
    function rewind() {
      reset($this->classes);
    }

    /**
     * Finds a class by a given class name
     *
     * @access  protected
     * @param   string classname
     * @return  string filename
     */
    function findClass($classname) {
      $filename= str_replace('.', DIRECTORY_SEPARATOR, $classname).'.class.php';
      foreach (array_unique(explode(PATH_SEPARATOR, ini_get('include_path'))) as $dir) {
{'fraction_non_alphanumeric': 0.1433093525179856, 'fraction_numerical': 0.008633093525179856, 'mean_word_length': 2.4178957718780727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1880897', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1060, 'n_words': 219}