<commit_before><?php if ( ! defined('DENY_ACCESS')) exit('403: No direct file access allowed');

/**
 * A Bright CMS
 * 
 * Open source, lightweight, web application framework and content management 
 * system in PHP.
 * 
 * @package A Bright CMS
 * @author <NAME>
 */

/**
 * Application Class
 * 
 * Acts as front controller which we use to find other controllers and run the 
 * application.
 * 
 * @subpackage core
 * @author <NAME>
 */
class Application
{
	/**
	 * Holds an instance of the application factory object.
	 *
	 * @var object $_application_factory
	 */
	private $_application_factory;

	/**
	 * Holds the default page controller name to build
	 *
	 * @var string $_default_page_controller
	 */
	private $_default_page_controller;
	
	/**
	 * Holds the controller path to search matching controllers from
	 *
	 * @var string $_controller_path
	 */
	private $_controller_path;
	
	/**
	 * Holds the user-entered URL, broken up into an array.
	 *
	 * @var array $_url
	 */
	private $_url = array();
	
	/**
	 * Holds the controller object instance.
	 *
	 * @var object $_controller
	 */
	private $_controller;
	
	/**
	 * Holds the name of the method to call
	 *
	 * @var string $_method
	 */
	private $_method;
	
	/**
	 * Holds the parameters for methods.
	 *
	 * @var array $_parameter
	 * 
	 * @todo consider using a different way of passing parameters to methods
	 */
	private $_parameter = array();
	
	/**
	 * We are sad if new bootstrap object doesn't load the application, so we
	 * make sure it does what it must to find the controller and set and load 
	 * dependencies.
	 * 
	 * Upon construction, we ultimately set the URL, controller, method, and 
	 * parameters. Then we send them to the router.
	 * 
	 * @param object $application_factory Application factory object
	 * @param array $get_data Loads data from the URL query string
	 */
	public function __construct(
		ApplicationFactory $application_factory, 
		$get_data,
		$default_page_controller = DEFAULT_PAGE_CONTROLLER,<commit_msg>Improve documentation<commit_after><?php if ( ! defined('DENY_ACCESS')) exit('403: No direct file access allowed');

/**
 * A Bright CMS
 * 
 * Open source, lightweight, web application framework and content management 
 * system in PHP.
 * 
 * @package A Bright CMS
 * @author <NAME>
 */

/**
 * Application Class
 * 
 * Acts as front controller which we use to find other controllers and run the 
 * application.
 * 
 * @subpackage core
 * @author <NAME>
 */
class Application
{
	/**
	 * Holds an instance of the application factory object.
	 *
	 * @var object $_application_factory
	 */
	private $_application_factory;

	/**
	 * Holds the default page controller name to build
	 *
	 * @var string $_default_page_controller
	 */
	private $_default_page_controller;
	
	/**
	 * Holds the controller path to search matching controllers from
	 *
	 * @var string $_controller_path
	 */
	private $_controller_path;
	
	/**
	 * Holds the user-entered URL, broken up into an array.
	 *
	 * @var array $_url
	 */
	private $_url = array();
	
	/**
	 * Holds the controller object instance.
	 *
	 * @var object $_controller
	 */
	private $_controller;
	
	/**
	 * Holds the name of the method to call
	 *
	 * @var string $_method
	 */
	private $_method;
	
	/**
	 * Holds the parameters for methods.
	 *
	 * @var array $_parameter
	 * 
	 * @todo consider using a different way of passing parameters to methods
	 */
	private $_parameter = array();
	
	/**
	 * We are sad if new bootstrap object doesn't load the application, so we
	 * make sure it does what it must to find the controller and set and load 
	 * dependencies.
	 * 
	 * Upon construction, we ultimately set the URL, controller, method, and 
	 * parameters. Then we send them to the router.
	 * 
	 * @param object $application_factory Application factory object
	 * @param array $get_data Loads data from the URL query string
	 * @param string $default_page_controller
	 * @param string $controller_path
	 */
	public function __construct(
		ApplicationFactory $application_factory, 
		$get_data,
		$default_page_controller = DEFAULT_PAGE_CONTROLLER,
{'fraction_non_alphanumeric': 0.0934761441090555, 'fraction_numerical': 0.0014605647517039922, 'mean_word_length': 3.307127882599581, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7099596', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1082, 'n_words': 454}