<commit_before><?php
namespace pirrs;
class RequestObject{
  public $request;
	public $response;


	protected $dbCon;

  public function __construct(){
      $this->dbCon = ResourceManager::getDatabaseController();
  }

    /*
	 * This function will be called before the template begins executing.
	 */
	public function preExecute(){}

	/*
	 * This function will be called after the template has completed execution.
	 */
	public function postExecute(){}<commit_msg>moved request $dbCon access to `__get()` method to only open database when requested.<commit_after><?php
namespace pirrs;
class RequestObject{
  public $request;
	public $response;


  //Access provided through __get()
	private $dbCon = null;

  public function __construct(){}

  public function __get($name) {
    switch($name){
      case 'dbCon':{
        if($this->dbCon === null){
          $this->dbCon = DatabaseController::get();
        }
        return $this->dbCon;
      }
      default:
        return null;
    }
  }

    /*
	 * This function will be called before the template begins executing.
	 */
	public function preExecute(){}

	/*
	 * This function will be called after the template has completed execution.
	 */
	public function postExecute(){}
{'fraction_non_alphanumeric': 0.10867802108678021, 'fraction_numerical': 0.0, 'mean_word_length': 3.240549828178694, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5443634', 'n_tokens_mistral': 345, 'n_tokens_neox': 323, 'n_words': 115}