<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  /**
   * Wraps LDAP entry
   *
   * @see 
   */
  class LDAPEntry extends Object {
    var
      $dn=          '',
      $attributes=  array();
      
    /**
     * Constructor
     *
     * @access  public
     * @param   string dn default NULL "distinct name"
     */
    function __construct($dn= NULL, $attrs= array()) {
      $this->dn= $dn;
      $this->attributes= $attrs;
      parent::__construct();
    }
    
    function setDN($dn) {
      $this->dn= $dn;
    }
    
    function getDN() {
      return $this->dn;
    }
    
    function addAttribute($key, $value) {
      $this->attributes[$key]= $value;
    }
    
    function getAttributes() {
      return $this->attributes;
    }
  }
?><commit_msg>-Add getAttribute() method<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  /**
   * Wraps LDAP entry
   *
   * @see 
   */
  class LDAPEntry extends Object {
    var
      $dn=          '',
      $attributes=  array();
      
    /**
     * Constructor
     *
     * @access  public
     * @param   string dn default NULL "distinct name"
     */
    function __construct($dn= NULL, $attrs= array()) {
      $this->dn= $dn;
      $this->attributes= $attrs;
      parent::__construct();
    }
    
    function setDN($dn) {
      $this->dn= $dn;
    }
    
    function getDN() {
      return $this->dn;
    }
    
    function setAttribute($key, $value) {
      $this->attributes[$key]= $value;
    }
    
    function getAttribute($key, $idx= -1) {
      if (-1 != $idx) return $this->attributes[$key][$idx];
      return $this->attributes[$key];
    }
    
    function getAttributes() {
      return $this->attributes;
    }
  }
?>
{'fraction_non_alphanumeric': 0.15607264472190693, 'fraction_numerical': 0.0011350737797956867, 'mean_word_length': 1.8208, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '807729', 'n_tokens_mistral': 584, 'n_tokens_neox': 580, 'n_words': 131}