<commit_before><?php

namespace Jestillore\PhpOpenfireUserservice;

class PHPOpenfireUserservice {

	private $_curl;

	public function __construct() {
		$this->_curl = new \anlutro\cURL\cURL;
	}

	private function request ($method, $url, $data = []) {

	}

	public function getAllUsers () {
		/**
		* TODO
		*/
	}

	public function getUser ($username) {
		/**
		* TODO
		*/
	}

	public function createUser ($user) {
		/**
		* TODO
		*/
	}

	public function deleteUser ($username) {
		/**
		* TODO
		*/
	}

	public function updateUser ($username, $user) {
		/**
		* TODO
		*/
	}

	public function lockUser ($username) {
		/**
		* TODO
		*/
	}

	public function unlockUser ($username) {
		/**
		* TODO
		*/
	}

	public function getUserGroups ($username) {
		/**
		* TODO
		*/
	}

	public function addUserToGroups ($username, $groups) {
		/**
		* TODO
		*/
	}

	public function removeUserFromGroups ($username, $groups) {
		/**
		* TODO
		*/
	}

	public function getUsersByProperty ($key, $value) {
		/**
		* TODO
		*/
	}

	public function getRoster ($username) {
		/**
		* TODO
		*/
	}

	public function addRosterEntry ($username, $roster) {
		/**
		* TODO
		*/
	}

	public function deleteRosterEntry ($username, $jid) {
		/**
		* TODO
		*/
	}

	public function updateRosterEntry ($username, $jid, $roster) {
		/**
		* TODO
		*/
	}

	public function test() {
		return $this->_curl->get('http://www.google.com');
	}

}
<commit_msg>add openfire specific methods<commit_after><?php

namespace Jestillore\PhpOpenfireUserservice;

class PHPOpenfireUserservice {

	public static AUTH_BASIC = 1;
	public static AUTH_SHARED_KEY = 2;

	/*
		openfire details
	*/
	private $endpoint;
	private $authType;
	private $username;
	private $password;
	private $key;

	private $curl;

	public function __construct() {
		$this->curl = new \anlutro\cURL\cURL;
	}

	public function setEndpoint ($endpoint) {
		$this->endpoint = $endpoint;
		return $this;
	}

	public function setAuthType ($authType) {
		$this->authType = $authType;
		return $this;
	}

	public function setUsername ($username) {
		$this->username = $username;
		return $this;
	}

	public function setPassword ($password) {
		$this->password = $password;
		return $this;
	}

	public function setSharedKey ($key) {
		$this->key = $key;
		return $this;
	}

	// Authorization header value based on selected authentication type
	private function getAuthorization() {
		switch ($this->authType) {
			case self::AUTH_BASIC:
				return 'Basic ' . base64_encode("$this->username:$this->password");
			case self::AUTH_SHARED_KEY:
				return $this->key;
		}
	}

	private function request ($method, $url, $data = []) {

	}

	public function getAllUsers () {
		/**
		* TODO
		*/
	}

	public function getUser ($username) {
		/**
		* TODO
		*/
	}

	public function createUser ($user) {
		/**
		* TODO
		*/
	}

	public function deleteUser ($username) {
		/**
		* TODO
		*/
	}

	public function updateUser ($username, $user) {
		/**
		* TODO
		*/
	}

	public function lockUser ($username) {
		/**
		* TODO
		*/
	}

	public function unlockUser ($username) {
		/**
		* TODO
		*/
	}

	public function getUserGroups ($username) {
		/**
		* TODO
		*/
	}

	public function addUserToGroups ($username, $groups) {
		/**
		* TODO
		*/
	}

	public function removeUserFromGroups ($username, $groups) {
		/**
		* TODO
		*/
	}

	public function getUsersByProperty ($key, $value) {
		/**
		* TODO
		*/
	}

	public function getRoster ($username) {
		/**
		* TODO
		*/
	}

	public function addRosterEntry ($username, $roster) {
		/**
		* TODO
		*/
	}

	public function deleteRosterEntry ($username, $jid) {
		/**
		* TODO
		*/
	}

	public function updateRosterEntry ($username, $jid, $roster) {
		/**
		* TODO
		*/
	}

	public function test() {
		return $this->_curl->get('http://www.google.com');
	}

}

{'fraction_non_alphanumeric': 0.15443104352385947, 'fraction_numerical': 0.001048767697954903, 'mean_word_length': 2.924897119341564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1218068', 'n_tokens_mistral': 1505, 'n_tokens_neox': 1328, 'n_words': 297}