<commit_before><?php
/**
 * Created by PhpStorm.
 * User: STEMulus
 * Date: 8/24/2016
 * Time: 2:36 PM
 */<commit_msg>setting up the api https://app.asana.com/0/161552024814128/170520114054344<commit_after><?php


require_once dirname(__DIR__, 2) . "/classes/autoload.php";
require_once dirname(__DIR__, 2) . "/lib/xsrf.php";
require_once("/etc/apache2/capstone-mysql/encrypted-config.php");

use Edu\Cnm\Flek;

/**
 * Api for Favorite class
 *
 * #author <NAME> <<EMAIL>>
 **/

//verify the session, start if not active
if(session_status() !== PHP_SESSION_ACTIVE) {
	session_start();
}

//prepare an empty reply
$reply = new stdClass();
$reply->status = 200;
$reply->data = null;


try {
	//grab the mySQL connection
	$pdo = connectToEncryptedMySQL("/etc/apache2/capstone-mysql/flek.ini");
	//determine which HTTP method was used
	$method = array_key_exists("HTTP_X_HTTP_METHOD", $_SERVER) ? $_SERVER["HTTP_X_HTTP_METHOD"] : $_SERVER["REQUEST_METHOD"];
{'fraction_non_alphanumeric': 0.16369359916054566, 'fraction_numerical': 0.05036726128016789, 'mean_word_length': 4.781818181818182, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, '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': '1996828', 'n_tokens_mistral': 376, 'n_tokens_neox': 345, 'n_words': 73}