<commit_before><?php
/**
 * Copyright (c) 2012-2013 Aalto University and University of Helsinki
 * MIT License
 * see LICENSE.txt for more information
 */

/**
 * Provides access to the http request information
 */
class Request 
{

  private $lang;
  private $clang;
  private $page;
  private $vocab;
  private $uri;
  private $letter;
  private $model;
  private $request_uri;

  /**
   * Initializes the Request Object
   */
  public function __construct($model)
  {
    $this->model = $model;
  }

  public function getLang() {
    return $this->lang;
  }

  /**
   * Sets the language variable
   * @param string $lang
   */
  public function setLang($lang) {
    if ($lang !== '')
      $this->lang = $lang;
  }

  public function getContentLang() {
    return $this->clang;
  }
<commit_msg>adding a function to Request for reading query string params<commit_after><?php
/**
 * Copyright (c) 2012-2013 Aalto University and University of Helsinki
 * MIT License
 * see LICENSE.txt for more information
 */

/**
 * Provides access to the http request information
 */
class Request 
{

  private $lang;
  private $clang;
  private $page;
  private $vocab;
  private $uri;
  private $letter;
  private $model;
  private $request_uri;

  /**
   * Initializes the Request Object
   */
  public function __construct($model)
  {
    $this->model = $model;
  }

  public function getQueryParam($param_name) {
    return (isset($_GET[$param_name])) ? $_GET[$param_name] : null;
  }

  public function getLang() {
    return $this->lang;
  }

  /**
   * Sets the language variable
   * @param string $lang
   */
  public function setLang($lang) {
    if ($lang !== '')
      $this->lang = $lang;
  }

  public function getContentLang() {
    return $this->clang;
  }

{'fraction_non_alphanumeric': 0.12592172433352242, 'fraction_numerical': 0.009075439591605219, 'mean_word_length': 3.0090909090909093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6913828', 'n_tokens_mistral': 576, 'n_tokens_neox': 546, 'n_words': 166}