<commit_before><?php

class CI_User {
	private $id;
	private $email;
	private $password;
	private $name;

	public function getId() {return $this->id;}
	
	public function getEmail(){return $this->email;}
	public function setEmail($email){$this->email = $email;}
	
	public function getPassword(){return $this->password;}
	public function setPassword($password){$this->password = $password;}
	
	public function getName(){return $this->name;}
	public function setName($name){$this->name = $name;}
	
	public function getEnabled(){return $this->enabled;}
	public function setEnabled($enabled){$this->enabled = $enabled;}

	/**
	 * Devuelve la informacion cargada del objeto 
	 * 	
	 * Uso interno
	 *  
	 * @return object
	 */
	private function getData(){
		$object = new stdClass();
		$object->id = $this->id;
		$object->email = $this->email;
		$object->password = $<PASSWORD>;
		$object->name = $this->name;
		return $object;
	}
	
	public static function getInstance($row){
		if(!($row instanceof stdClass)){
			show_error("El row debe ser una instancia de stdClass.");
		}	
		$user = new self;
		$user->id = (isset($row->user_id)) ? $row->user_id : 0;
		$user->email = (isset($row->email)) ? $row->email : '';
		$user->password = (isset($row->password)) ? $row->password : '';
		return $user;
	}
	
	public static function getUsers()
	{
		$CI = & get_instance();
		$CI->load->model('user_model');
		$results = $CI->user_model->getUsers();
		$return = array();<commit_msg>Actualizo modelo de la clase User agregando todos sus atributos<commit_after><?php

class CI_User {
	private $id;
	private $email;
	private $password;
	private $name;
	private $lastName;
	private $birthdayDate;
	private $description;
	private $phones;
	private $addresses;
	private $enabled;
	private $deleted;

	public function getId() {return $this->id;}
	
	public function getEmail(){return $this->email;}
	public function setEmail($email){$this->email = $email;}
	
	public function getPassword(){return $this->password;}
	public function setPassword($password){$this->password = $password;}
	
	public function getName(){return $this->name;}
	public function setName($name){$this->name = $name;}
	
	public function getLastName(){return $this->lastName;}
	public function setLastName($lastName){$this->lastName = $lastName;}

	public function getBirthdayDate(){return $this->birthdayDate;}
	public function setBirthdayDate($birthdayDate){$this->birthdayDate = $birthdayDate;}

	public function getDescription(){return $this->description;}
	public function setDescription($description){$this->description = $description;}

	public function getPhones(){return CI_Phones::getPhonesByUserId ($this->id);}
	// public function setPhones($bio){$this->bio = $bio;}

	public function getAddresses(){return CI_Address::getAddresByUserId ($this->id);}
	// public function setAddresses($bio){$this->bio = $bio;}

	/**
	 * Devuelve la informacion cargada del objeto 
	 * Uso interno
	 * @return object
	 */
	private function getData(){
		$object = new stdClass();
		$object->id = $this->id;
		$object->email = $this->email;
		$object->password = $<PASSWORD>;
		$object->name = $this->name;
		$object->lastName = $this->lastName;
		$object->birthdayDate = $this->birthdayDate;
		$object->description = $this->description;
		$object->phones = $this->phones;
		$object->addresses = $this->addresses;
		$object->enabled = $this->enabled;
		$object->deleted = $this->deleted;
		return $object;
	}
	
	public static function getInstance($row){
		if(!($row instanceof stdClass)){
			show_error("El row debe ser una instancia de stdClass.");
		}	
		$user = new self;
		$user->id = (isset($row->user_id)) ? $row->user_id : 0;
		$user->email = (isset($row->email)) ? $row->email : '';
		$user->password = (isset($row->password)) ? $row->password : '';
		$user->name = (isset($row->name)) ? $row->name : '';
		$user->lastName = (isset($row->last_name)) ? $row->last_name : '';
		$user->birthdayDate = (isset($row->birthday_date)) ? $row->birthday_date : '';
		$user->description = (isset($row->description)) ? $row->password : '';
		$user->enabled = (isset($row->enabled)) ? $row->enabled : '';
		$user->deleted = (isset($row->deleted)) ? $row->deleted : '';
		$user->phones = CI_Phones::getPhonesByUserId ($user->id);
		//$user->addresses = CI_Address::getAddresByUserId($user->id);
		return $user;
	}
	
	public static function getUsers()
	{
		$CI = & get_instance();
		$CI->load->model('user_model');
		$results = $CI->user_model->getUsers();
		$return = array();
{'fraction_non_alphanumeric': 0.18318917720115324, 'fraction_numerical': 0.00044355732978487467, 'mean_word_length': 4.864759427828348, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 107, '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': '2120276', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1440, 'n_words': 323}