Skip to content
Permalink
Browse files

Setup Ori (https://github.com/BookOfOrigin/Ori) and lay groundwork.

  • Loading branch information...
NerdGuruDevelopers committed Mar 7, 2016
1 parent 6f15d8a commit 89b3cfd744d9500ac2a6dc9f3625bc902d543fdd
Showing with 37,038 additions and 0 deletions.
  1. +21 −0 License.txt
  2. +2 −0 README.md
  3. +11 −0 composer.json
  4. +74 −0 composer.lock
  5. +2 −0 hidden/.htaccess
  6. +10 −0 hidden/config/databases.json
  7. +6 −0 hidden/config/routes.json
  8. +10 −0 hidden/config/settings.json
  9. +4 −0 hidden/logs/.gitignore
  10. +2 −0 includes/.htaccess
  11. +10 −0 includes/Controllers/Home/Index.php
  12. +10 −0 includes/Controllers/Home/NoRoute.php
  13. +87 −0 includes/Library/Origin/Autoload/Autoload.php
  14. +204 −0 includes/Library/Origin/DB/DB.php
  15. +78 −0 includes/Library/Origin/Log/Log.php
  16. +142 −0 includes/Library/Origin/Router/Router.php
  17. +8 −0 includes/Library/Origin/Utilities/Bucket/Any.php
  18. +12 −0 includes/Library/Origin/Utilities/Bucket/Boolean.php
  19. +15 −0 includes/Library/Origin/Utilities/Bucket/Bucket.php
  20. +22 −0 includes/Library/Origin/Utilities/Bucket/CheckPopulated.php
  21. +6 −0 includes/Library/Origin/Utilities/Bucket/Common.php
  22. +8 −0 includes/Library/Origin/Utilities/Bucket/Date.php
  23. +11 −0 includes/Library/Origin/Utilities/Bucket/Hash.php
  24. +11 −0 includes/Library/Origin/Utilities/Bucket/Number.php
  25. +11 −0 includes/Library/Origin/Utilities/Bucket/String.php
  26. +8 −0 includes/Library/Origin/Utilities/Bucket/ToArray.php
  27. +58 −0 includes/Library/Origin/Utilities/Layout.php
  28. +84 −0 includes/Library/Origin/Utilities/Settings.php
  29. +4 −0 includes/Library/Origin/Utilities/Types/Exception.php
  30. +26 −0 includes/Library/Origin/Utilities/Types/Hash.php
  31. +24 −0 includes/Library/Origin/Utilities/Types/Singleton.php
  32. +88 −0 includes/Library/Origin/Utilities/Utilities.php
  33. +12 −0 includes/loader.php
  34. +3 −0 index.php
  35. +2 −0 templates/.htaccess
  36. +12 −0 templates/404.tpl
  37. +8 −0 templates/css/starter-template.css
  38. +6 −0 templates/footer.tpl
  39. +35 −0 templates/header.tpl
  40. +15 −0 templates/index.tpl
  41. +4 −0 templates_c/.gitignore
  42. +7 −0 vendor/autoload.php
  43. +413 −0 vendor/composer/ClassLoader.php
  44. +21 −0 vendor/composer/LICENSE
  45. +120 −0 vendor/composer/autoload_classmap.php
  46. +9 −0 vendor/composer/autoload_namespaces.php
  47. +9 −0 vendor/composer/autoload_psr4.php
  48. +45 −0 vendor/composer/autoload_real.php
  49. +59 −0 vendor/composer/installed.json
  50. +22 −0 vendor/smarty/smarty/.gitattributes
  51. +222 −0 vendor/smarty/smarty/.gitignore
  52. +18 −0 vendor/smarty/smarty/.travis.yml
  53. +29 −0 vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt
  54. +165 −0 vendor/smarty/smarty/COPYING.lib
  55. +35 −0 vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt
  56. +86 −0 vendor/smarty/smarty/NEW_FEATURES.txt
  57. +574 −0 vendor/smarty/smarty/README
  58. +52 −0 vendor/smarty/smarty/README.md
  59. +109 −0 vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt
  60. +24 −0 vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt
  61. +306 −0 vendor/smarty/smarty/SMARTY_3.1_NOTES.txt
  62. +2,649 −0 vendor/smarty/smarty/change_log.txt
  63. +43 −0 vendor/smarty/smarty/composer.json
  64. +5 −0 vendor/smarty/smarty/demo/configs/test.conf
  65. +30 −0 vendor/smarty/smarty/demo/index.php
  66. +83 −0 vendor/smarty/smarty/demo/plugins/cacheresource.apc.php
  67. +97 −0 vendor/smarty/smarty/demo/plugins/cacheresource.memcache.php
  68. +162 −0 vendor/smarty/smarty/demo/plugins/cacheresource.mysql.php
  69. +322 −0 vendor/smarty/smarty/demo/plugins/cacheresource.pdo.php
  70. +43 −0 vendor/smarty/smarty/demo/plugins/cacheresource.pdo_gzip.php
  71. +60 −0 vendor/smarty/smarty/demo/plugins/resource.extendsall.php
  72. +81 −0 vendor/smarty/smarty/demo/plugins/resource.mysql.php
  73. +62 −0 vendor/smarty/smarty/demo/plugins/resource.mysqls.php
  74. +2 −0 vendor/smarty/smarty/demo/templates/footer.tpl
  75. +5 −0 vendor/smarty/smarty/demo/templates/header.tpl
  76. +87 −0 vendor/smarty/smarty/demo/templates/index.tpl
  77. +318 −0 vendor/smarty/smarty/lexer/smarty_internal_configfilelexer.plex
  78. +362 −0 vendor/smarty/smarty/lexer/smarty_internal_configfileparser.y
  79. +770 −0 vendor/smarty/smarty/lexer/smarty_internal_templatelexer.plex
  80. +1,329 −0 vendor/smarty/smarty/lexer/smarty_internal_templateparser.y
  81. +158 −0 vendor/smarty/smarty/libs/Autoloader.php
  82. +1,802 −0 vendor/smarty/smarty/libs/Smarty.class.php
  83. +448 −0 vendor/smarty/smarty/libs/SmartyBC.class.php
  84. +160 −0 vendor/smarty/smarty/libs/debug.tpl
  85. +110 −0 vendor/smarty/smarty/libs/plugins/block.textformat.php
  86. +78 −0 vendor/smarty/smarty/libs/plugins/function.counter.php
  87. +107 −0 vendor/smarty/smarty/libs/plugins/function.cycle.php
  88. +221 −0 vendor/smarty/smarty/libs/plugins/function.fetch.php
  89. +237 −0 vendor/smarty/smarty/libs/plugins/function.html_checkboxes.php
  90. +163 −0 vendor/smarty/smarty/libs/plugins/function.html_image.php
  91. +196 −0 vendor/smarty/smarty/libs/plugins/function.html_options.php
  92. +221 −0 vendor/smarty/smarty/libs/plugins/function.html_radios.php
  93. +387 −0 vendor/smarty/smarty/libs/plugins/function.html_select_date.php
  94. +364 −0 vendor/smarty/smarty/libs/plugins/function.html_select_time.php
  95. +176 −0 vendor/smarty/smarty/libs/plugins/function.html_table.php
  96. +155 −0 vendor/smarty/smarty/libs/plugins/function.mailto.php
  97. +91 −0 vendor/smarty/smarty/libs/plugins/function.math.php
  98. +90 −0 vendor/smarty/smarty/libs/plugins/modifier.capitalize.php
  99. +65 −0 vendor/smarty/smarty/libs/plugins/modifier.date_format.php
  100. +116 −0 vendor/smarty/smarty/libs/plugins/modifier.debug_print_var.php
  101. +198 −0 vendor/smarty/smarty/libs/plugins/modifier.escape.php
  102. +57 −0 vendor/smarty/smarty/libs/plugins/modifier.regex_replace.php
  103. +34 −0 vendor/smarty/smarty/libs/plugins/modifier.replace.php
  104. +27 −0 vendor/smarty/smarty/libs/plugins/modifier.spacify.php
  105. +64 −0 vendor/smarty/smarty/libs/plugins/modifier.truncate.php
  106. +29 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.cat.php
  107. +32 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.count_characters.php
  108. +27 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.count_paragraphs.php
  109. +27 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.count_sentences.php
  110. +31 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.count_words.php
  111. +35 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.default.php
  112. +126 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.escape.php
  113. +33 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.from_charset.php
  114. +33 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.indent.php
  115. +31 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.lower.php
  116. +21 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.noprint.php
  117. +25 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.string_format.php
  118. +33 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.strip.php
  119. +29 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.strip_tags.php
  120. +33 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.to_charset.php
  121. +50 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
  122. +29 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.upper.php
  123. +47 −0 vendor/smarty/smarty/libs/plugins/modifiercompiler.wordwrap.php
  124. +90 −0 vendor/smarty/smarty/libs/plugins/outputfilter.trimwhitespace.php
  125. +53 −0 vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
  126. +35 −0 vendor/smarty/smarty/libs/plugins/shared.literal_compiler_param.php
  127. +43 −0 vendor/smarty/smarty/libs/plugins/shared.make_timestamp.php
  128. +55 −0 vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php
  129. +54 −0 vendor/smarty/smarty/libs/plugins/shared.mb_unicode.php
  130. +73 −0 vendor/smarty/smarty/libs/plugins/shared.mb_wordwrap.php
  131. +19 −0 vendor/smarty/smarty/libs/plugins/variablefilter.htmlspecialchars.php
  132. +229 −0 vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource.php
  133. +312 −0 vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_custom.php
  134. +510 −0 vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
  135. +66 −0 vendor/smarty/smarty/libs/sysplugins/smarty_data.php
  136. +320 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
  137. +50 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_append.php
  138. +86 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_assign.php
  139. +443 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php
  140. +75 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_break.php
  141. +85 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php
  142. +96 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_capture.php
  143. +81 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_config_load.php
  144. +75 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_continue.php
  145. +41 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_debug.php
  146. +71 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_eval.php
  147. +85 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php
  148. +166 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_for.php
  149. +288 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_foreach.php
  150. +230 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_function.php
  151. +221 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php
  152. +298 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include.php
  153. +107 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php
  154. +148 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_insert.php
  155. +39 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
  156. +75 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_nocache.php
  157. +85 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
  158. +71 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
  159. +139 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
  160. +86 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_block_function.php
  161. +84 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
  162. +197 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_php.php
  163. +151 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_print_expression.php
  164. +111 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_registered_block.php
  165. +79 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_registered_function.php
  166. +120 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
  167. +39 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_rdelim.php
  168. +206 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_section.php
  169. +70 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_setfilter.php
  170. +98 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_while.php
  171. +174 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_compilebase.php
  172. +190 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
  173. +699 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_configfilelexer.php
  174. +1,010 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_configfileparser.php
  175. +404 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_data.php
  176. +424 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php
  177. +127 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_codeframe.php
  178. +160 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_config.php
  179. +85 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_defaulttemplatehandler.php
  180. +67 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_filter_handler.php
  181. +71 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_function_call_handler.php
  182. +46 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_get_include_path.php
  183. +51 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_nocache_insert.php
  184. +49 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree.php
  185. +42 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_code.php
  186. +86 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_dq.php
  187. +42 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_dqcontent.php
  188. +66 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_tag.php
  189. +98 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php
  190. +40 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_text.php
  191. +96 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_eval.php
  192. +112 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_extends.php
  193. +216 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_file.php
  194. +100 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php
  195. +98 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_registered.php
  196. +81 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_stream.php
  197. +97 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_string.php
  198. +136 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
  199. +922 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
  200. +557 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
  201. +1,026 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
  202. +1,368 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatelexer.php
  203. +2,409 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php
  204. +571 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_testinstall.php
  205. +303 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_utility.php
  206. +88 −0 vendor/smarty/smarty/libs/sysplugins/smarty_internal_write_file.php
  207. +284 −0 vendor/smarty/smarty/libs/sysplugins/smarty_resource.php
  208. +95 −0 vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php
  209. +40 −0 vendor/smarty/smarty/libs/sysplugins/smarty_resource_recompiled.php
  210. +72 −0 vendor/smarty/smarty/libs/sysplugins/smarty_resource_uncompiled.php
  211. +644 −0 vendor/smarty/smarty/libs/sysplugins/smarty_security.php
  212. +403 −0 vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php
  213. +288 −0 vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php
  214. +118 −0 vendor/smarty/smarty/libs/sysplugins/smarty_template_config.php
  215. +285 −0 vendor/smarty/smarty/libs/sysplugins/smarty_template_source.php
  216. +37 −0 vendor/smarty/smarty/libs/sysplugins/smarty_undefined_variable.php
  217. +55 −0 vendor/smarty/smarty/libs/sysplugins/smarty_variable.php
  218. +39 −0 vendor/smarty/smarty/libs/sysplugins/smartycompilerexception.php
  219. +15 −0 vendor/smarty/smarty/libs/sysplugins/smartyexception.php
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Feathur

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,2 @@
# Ori
Simple Lightweight PHP Framework
@@ -0,0 +1,11 @@
{
"name" : "book-of-origin/ori",
"license": "MIT",
"repositories": [{
"type": "vcs",
"url": "https://github.com/BookOfOrigin/Ori"
}],
"require": {
"smarty/smarty": "~3.1"
}
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,2 @@
order deny,allow
deny from all
@@ -0,0 +1,10 @@
{
"test" : {
"hostname" : "test",
"username" : "test",
"password" : "test",
"database" : "test",
"port" : "3306",
"type" : "mysql"
}
}
@@ -0,0 +1,6 @@
{
"routes" : {
"*" : "Home/Index/Main",
"404" : "Home/NoRoute/Main"
}
}
@@ -0,0 +1,10 @@
{
"site" : {
"title" : "Ori Example Site"
},
"origin" : {
"max_route_attempts" : "3",
"log_level" : "2",
"generic_log_file" : "log.log"
}
}
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
@@ -0,0 +1,2 @@
order deny,allow
deny from all
@@ -0,0 +1,10 @@
<?php
namespace Controllers\Home;
use \Origin\Utilities\Layout;
class Index {
public function Main(){
Layout::Get()->Display('index.tpl');
}
}
@@ -0,0 +1,10 @@
<?php
namespace Controllers\Home;
use \Origin\Utilities\Layout;
class NoRoute {
public function Main(){
Layout::Get()->Display('404.tpl');
}
}
@@ -0,0 +1,87 @@
<?php
namespace Origin\Autoload {
use \Origin\Autoload\AutoloadException;
class Autoload {
/*
* Static paths to include files (usually files which are not namespaced or have specific namespaces that would not normally load correctly).
* Ideally eventually this will be moved to some sort of a config file.
* If you have another autoloader file I'd personally suggest putting it on line 8 of incluides/loader.php
*/
public static $static_paths = array();
public static $autoload_paths = array(
'includes/Library/%s.php',
'includes/Library/%s.class.php',
'%s.php',
'%s.class.php',
);
/*
*
*/
public static function Load($class){
if(self::StaticPath($class)){
return true;
}
$path = explode(constant('NAMESPACE'), $class);
return self::LoadClassOrDie(implode(DIRECTORY_SEPARATOR, $path));
}
/*
* @params - $class
* Attempts to look for a static path match. If found it will load that class.
* @return boolean (Successfully loaded a class).
*/
private static function StaticPath($class){
// Direct comparison.
if(in_array($class, self::$static_paths)){
require_once(self::$static_paths[$class]);
return true;
}
// If we're this far in the direct comparison has failed. So we'll look for "off by one".
foreach(self::$static_paths as $namespace => $path){
if(stripos($namespace, $class) !== false){
if(self::Difference((strlen($namespace) - strlen($class)), -1, 1)){
require_once(self::$static_paths[$class]);
return true;
}
}
}
return false;
}
/*
* @params - $val, $min, $max
* Determines if the value is greater than min and less than max.
* @return boolean ($val is between $min and $max)
*/
private static function Difference($val, $min, $max) {
return ($val >= $min && $val <= $max);
}
/*
* @params - Path to the file without the file's extension.
* Attempts to find a file matching the path passed to it based on possible autoload locations ($autoload_paths).
* @return boolean (Successfully found and loaded file.)
*
* NOTE: Will throw AutoloadException if the file does not exist or the path is invalid.
*/
private static function LoadClassOrDie($path){
foreach(self::$autoload_paths as $location){
//die(print_r(sprintf($location, $path), true));
if(file_exists(sprintf($location, $path))){
require_once(sprintf($location, $path));
return true;
}
}
throw new AutoloadException("Invalid path specified unable to load {$path}");
}
}
class AutoloadException extends \Exception {}
}
Oops, something went wrong.

0 comments on commit 89b3cfd

Please sign in to comment.
You can’t perform that action at this time.