<commit_before><?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Fb_ignited {

	/**
	 * Facebook Ignited! 
	 *
	 * Do Not Edit This File, Could Cause Disruption of App 
	 */
	private $globals;
	
	public function __construct($params) {
		/**
		 * This grabs the variables from you config/fb_ignited.php file and 
		 * stores them in the globals variable, while passing the below three
		 * to the Facebook SDK when it is called. The instance of CodeIgniter is 
		 * set to $this->CI in order to allow usage from the whole class. Additionally
		 * it parses the query strings for the `state` and `code` variables sent to the 
		 * app so that there won't be constant redirection.
		 */
		parse_str($_SERVER['QUERY_STRING'], $fb_query_strings);
		$_REQUEST['state'] = $fb_query_strings['state'];
		$_REQUEST['code']  = $fb_query_strings['code']; 
		$fb_params = $this->fb_set_globals($params);
		$this->CI = & get_instance();
		$this->CI->load->library('facebook', $fb_params);
	}

	function __call($method, $params) {
		/**
		 * This method is used to make sure that if the method being called from the
		 * class is not present it will then look into the Facebook SDK, check if it exists.
		 * If it does not then it returns a false which the user can use to determine what to do.
		 */
		$this->CI->load->helper('params');
		if (method_exists($this->CI->facebook, $method)) {
			return wrap_call_user_func_array($this->CI->facebook, $method, $params);
		} else {
			return false;
		}
	}

	public function fb_accept_requests($request_ids, $callback = false) {
		/**
		 * This function will handle all your friend requests.
		 * ---
		 * The $callback variable is a holding place for the call of an external model and function.
		 * 
		 * Usage: $callback = array('file'=>'fb_requests_mode','method'=>'database_insert');<commit_msg>Update libraries/Fb_ignited.php<commit_after><?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Fb_ignited {

	/**
	 * Facebook Ignited! 
	 *
	 * Do Not Edit This File, Could Cause Disruption of App 
	 */
	private $globals;
	
	public function __construct($params) {
		/**
		 * This grabs the variables from you config/fb_ignited.php file and 
		 * stores them in the globals variable, while passing the below three
		 * to the Facebook SDK when it is called. The instance of CodeIgniter is 
		 * set to $this->CI in order to allow usage from the whole class. Additionally
		 * it parses the query strings for the `state` and `code` variables sent to the 
		 * app so that there won't be constant redirection.
		 */
		parse_str($_SERVER['QUERY_STRING'], $fb_query_strings);
		if (isset($fb_query_strings['state'])) $_REQUEST['state'] = $fb_query_strings['state'];
		if (isset($fb_query_strings['code'])) $_REQUEST['code']  = $fb_query_strings['code']; 
		$fb_params = $this->fb_set_globals($params);
		$this->CI = & get_instance();
		$this->CI->load->library('facebook', $fb_params);
	}

	function __call($method, $params) {
		/**
		 * This method is used to make sure that if the method being called from the
		 * class is not present it will then look into the Facebook SDK, check if it exists.
		 * If it does not then it returns a false which the user can use to determine what to do.
		 */
		$this->CI->load->helper('params');
		if (method_exists($this->CI->facebook, $method)) {
			return wrap_call_user_func_array($this->CI->facebook, $method, $params);
		} else {
			return false;
		}
	}

	public function fb_accept_requests($request_ids, $callback = false) {
		/**
		 * This function will handle all your friend requests.
		 * ---
		 * The $callback variable is a holding place for the call of an external model and function.
		 * 
		 * Usage: $callback = array('file'=>'fb_requests_mode','method'=>'database_insert');
{'fraction_non_alphanumeric': 0.12202147158942131, 'fraction_numerical': 0.0, 'mean_word_length': 3.8849104859335037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1517897', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1101, 'n_words': 410}