<commit_before>=========================================
Obsidian Moon Engine v1.1.0 Documentation
=========================================
This is a project that I have worked on for several months after being inspired by CodeIgniter.
After setting up the initial steps of the system I am opening the project up for open source.
Feel free to contribute and peer review my work, please not that there are a few pieces that are based on CodeIgniter that need to be worked on.

-deth4uall aka Rev. <NAME>, III


Instructions for Installation
=============================

You will need a few things for this to work correctly: 
	
1) This code 
2) Hosting with PHP support

You will need to place the ``Obsidian-Moon-Engine`` folder in the ``/home/user/`` directory also known as ``~/``

You can do so by doing: ``cd ~/`` followed by ``git clone git://github.com/deth4uall/Obsidian-Moon-Engine.git`` which will clone the latest master version 
into that the ``Obsidian-Moon-Engine`` directory.

Create a folder that will hold the contents of application folder, and ensure that it is a document root for better results.
The sub folder feature needs to be worked on.

You can initiate the Obsidian Moon Engine in your index and add basic functionality with the following:

	::
	
		session_start();
		// Get the URI from the system explode it into an array, grab the control and then slice the rest 
		// into a variable called $params. 
		$uri = explode('/', trim($_SERVER['REQUEST_URI'], '/'));
		$control = $uri[0];
		$params = array_slice($uri, 1);
		// Include and instantiate the class
		include('/home/user/Obsidian-Moon-Engine/ObsidianMoonCore.php');
		$conf = array(
			'core' => '/home/user/Obsidian-Moon-Engine/',
			'libs' => dirname(__FILE__) . '/libraries/',
			'base' => dirname(__FILE__) . '/',
			'publ' => $_SERVER['HTTP_HOST'],
			'modules' => array(
				'input'
			)
		);
		$core = new ObsidianMoonCore($conf);
		// Handle what control is called
		if ($control == "") {
			// If a control isn't called use the default 
			include("{$core->conf_libs}control/{$core->conf_defcon}.php");
		} elseif (!file_exists("{$core->conf_libs}control/{$control}.php")) {
			// Use default if the called control is not available
			include("{$core->conf_libs}control/{$core->conf_defcon}.php");
		} else {
			// If existant then use the control called
			include("{$core->conf_libs}control/{$control}.php");
		}
		// Finally let's echo out the output!
		echo $core->output;

After that we will need to make sure that we also add a .htaccess to the system as well

	::
	
		RewriteEngine On 
		Options +FollowSymLinks
		RewriteBase /	
		
		# Remove the ability to access libraries folder
		RewriteCond %{REQUEST_URI} ^libraries.*
		RewriteRule ^(.*)$ /index.php?/$1 [L]
		
		#Checks to see if the user is attempting to access a valid file,
		#such as an image or css document, if this isn't true it sends the
		#request to index.php
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule ^(.*)$ index.php?/$1 [L]

Once you have those two files squared away you will want to set up your working directory like such for the sanity of the framework:

	::
	
		/
		|-- libraries/
		|   |-- classes/		* Holds all of your classes
		|   |-- configs/		* This holds the configs for your classes
		|   |   |-- core/		* Core class configs (eg. core_mysql)
		|   |-- control/		* All of the controllers for your app go in here
		|   |-- third_party/	* Any classes that are not maintained by you can be placed here and called
		|   |-- views/			* HTML views for you to insert data into
		|-- static/				* I use a static fold to hold all my assets
		|-- .htaccess
		|-- index.php

Instructions for Using Obsidian Moon
====================================

There are two functions that you really ne

Summary of Obsidian Moon
========================

You will find that the Obsidian Moon Engine is 100% modular and will expand as you build code into it. Feel free to add modules, tweak the code and 
add features I have not thought of, however please give credit by placing "Powered by Obsidian Moon" if you do use the engine. And if you make code that 
improves on what I have now, feel free to share back! Thanks and Enjoy!<commit_msg>Updating the README Signed-off-by:<NAME> <<EMAIL>><commit_after>=========================================
Obsidian Moon Engine v1.1.0 Documentation
=========================================
This is a project that I have worked on for several months after being inspired by CodeIgniter.
After setting up the initial steps of the system I am opening the project up for open source.
Feel free to contribute and peer review my work, please not that there are a few pieces that are based on CodeIgniter that need to be worked on.

-deth4uall aka Rev. <NAME>, III


Instructions for Installation
=============================

You will need a few things for this to work correctly: 
	
1) This code 
2) Hosting with PHP support

You will need to place the ``Obsidian-Moon-Engine`` folder in the ``/home/user/`` directory also known as ``~/``

You can do so by doing: ``cd ~/`` followed by ``git clone git://github.com/deth4uall/Obsidian-Moon-Engine.git`` which will clone the latest master version 
into that the ``Obsidian-Moon-Engine`` directory.

Create a folder that will hold the contents of application folder, and ensure that it is a document root for better results.
The sub folder feature needs to be worked on.

You can initiate the Obsidian Moon Engine in your index and add basic functionality with the following:

	::
	
		session_start();
		// Get the URI from the system explode it into an array, grab the control and then slice the rest 
		// into a variable called $params. 
		$uri = explode('/', trim($_SERVER['REQUEST_URI'], '/'));
		$control = $uri[0];
		$params = array_slice($uri, 1);
		// Include and instantiate the class
		include('/home/user/Obsidian-Moon-Engine/ObsidianMoonCore.php');
		$conf = array(
			'core' => '/home/user/Obsidian-Moon-Engine/',
			'libs' => dirname(__FILE__) . '/libraries/',
			'base' => dirname(__FILE__) . '/',
			'defcon' => 'main', //default control
			'publ' => $_SERVER['HTTP_HOST'],
			'modules' => array(
				'input'
			) // Modules lists all of the classes you want to load automatically
		);
		// All values are set as $core->conf_**** by their key value
		$core = new ObsidianMoonCore($conf);
		// Handle what control is called
		if ($control == "") {
			// If a control isn't called use the default 
			include("{$core->conf_libs}control/{$core->conf_defcon}.php");
		} elseif (!file_exists("{$core->conf_libs}control/{$control}.php")) {
			// Use default if the called control is not available
			include("{$core->conf_libs}control/{$core->conf_defcon}.php");
		} else {
			// If existant then use the control called
			include("{$core->conf_libs}control/{$control}.php");
		}
		// Finally let's echo out the output!
		echo $core->output;

After that we will need to make sure that we also add a .htaccess to the system as well

	::
	
		RewriteEngine On 
		Options +FollowSymLinks
		RewriteBase /	
		
		# Remove the ability to access libraries folder
		RewriteCond %{REQUEST_URI} ^libraries.*
		RewriteRule ^(.*)$ /index.php?/$1 [L]
		
		#Checks to see if the user is attempting to access a valid file,
		#such as an image or css document, if this isn't true it sends the
		#request to index.php
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule ^(.*)$ index.php?/$1 [L]

Once you have those two files squared away you will want to set up your working directory like such for the sanity of the framework:

	::
	
		/
		|-- libraries/
		|   |-- classes/		* Holds all of your classes
		|   |-- configs/		* This holds the configs for your classes
		|   |   |-- core/		* Core class configs (eg. core_mysql)
		|   |-- control/		* All of the controllers for your app go in here
		|   |-- third_party/	* Any classes that are not maintained by you can be placed here and called
		|   |-- views/			* HTML views for you to insert data into
		|-- static/				* I use a static fold to hold all my assets
		|-- .htaccess
		|-- index.php

Instructions for Using Obsidian Moon
====================================

There are two functions that you really need to know. The first of all is the classes method. Let's start off by creating a basic class that will be used.

	::
		
		<?php
		// Location: /home/user/public_html/libraries/classes/basic_class.php
		class basic_class {
			var $core; // We need this so that we can access the core from within the class as $this->core
			
			function __construct() { }
			
			function my_method() {
				// Random stuff
			}

			function om_start() {
				// If you need to do something after the construct but need $this->core run it here
				// If this method exists it will be automatically run
			}
		}

This class will now be accessible from within your controller to be started. Let's go over that a bit so that you know how you can start up a class.

	::
		
		<?php
		// Location: /home/user/public_html/libraries/control/main.php
		$core->classes('basic_class','basic'); // This allows you to pull up the ../classes/basic_class.php and assign it to 'basic'
		$core->basic->my_method(); // You are then able to call it from core
		// Another thing that you can do is use the third_party folder, since some of you like to use smarty which has the class name as 'Smarty'
		$core->classes('third_party/Smarty/Smarty.class', 'smarty', 'Smarty'); // The third option allows you to declare what the class name is from the file
		$core->smarty->display();
		// Finally, if you need to declare several files in one shot you can pass an array to the first parameter and it will handle it:
		$core->classes(array(
			'basic_class',
			'core/core_input'=>'input',
			'third_party/Smarty/Smarty.class'=>array('smarty','Smarty') 
		);
		// The above is the equivalent of:
		$core->classes('basic_class'); // $core->basic_class->my_method();
		$core->classes('core/core_input','input'); // $core->input->post('post_var');
		$core->classes('third_party/Smarty/Smarty.class','smarty','Smarty'); // $core->smarty->display();

Summary of Obsidian Moon
========================

You will find that the Obsidian Moon Engine is 100% modular and will expand as you build code into it. Feel free to add modules, tweak the code and 
add features I have not thought of, however please give credit by placing "Powered by Obsidian Moon" if you do use the engine. And if you make code that 
improves on what I have now, feel free to share back! Thanks and Enjoy!
{'fraction_non_alphanumeric': 0.13467696364663778, 'fraction_numerical': 0.0026370314560180824, 'mean_word_length': 3.565348237317283, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 54, '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': '3331660', 'n_tokens_mistral': 3400, 'n_tokens_neox': 3014, 'n_words': 1334}