codeigniter_vender 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. data/.gitignore +2 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +40 -0
  4. data/Rakefile +18 -0
  5. data/VERSION +1 -0
  6. data/codeigniter_vender.gemspec +389 -0
  7. data/generators/ci_app/USAGE +8 -0
  8. data/generators/ci_app/ci_app_generator.rb +12 -0
  9. data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +118 -0
  10. data/generators/ci_app/templates/CodeIgniter_1.7.2/license.txt +52 -0
  11. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/autoload.php +116 -0
  12. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/config.php +329 -0
  13. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/constants.php +41 -0
  14. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/database.php +55 -0
  15. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/doctypes.php +15 -0
  16. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/hooks.php +16 -0
  17. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/index.html +10 -0
  18. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/mimes.php +105 -0
  19. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/routes.php +48 -0
  20. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/smileys.php +66 -0
  21. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/user_agents.php +175 -0
  22. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/index.html +10 -0
  23. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +17 -0
  24. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_404.php +34 -0
  25. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_db.php +34 -0
  26. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_general.php +34 -0
  27. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_php.php +10 -0
  28. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/index.html +10 -0
  29. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers/index.html +10 -0
  30. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks/index.html +10 -0
  31. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/index.html +10 -0
  32. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english/index.html +10 -0
  33. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries/index.html +10 -0
  34. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models/index.html +10 -0
  35. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/index.html +10 -0
  36. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/welcome_message.php +62 -0
  37. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/cache/index.html +10 -0
  38. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +69 -0
  39. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +56 -0
  40. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +280 -0
  41. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +421 -0
  42. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +93 -0
  43. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/index.html +10 -0
  44. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB.php +146 -0
  45. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_active_rec.php +1820 -0
  46. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_cache.php +195 -0
  47. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_driver.php +1366 -0
  48. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_forge.php +375 -0
  49. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_result.php +342 -0
  50. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_utility.php +389 -0
  51. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/index.html +10 -0
  52. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/index.html +10 -0
  53. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_driver.php +667 -0
  54. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_forge.php +248 -0
  55. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_result.php +169 -0
  56. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_utility.php +123 -0
  57. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/index.html +10 -0
  58. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_driver.php +670 -0
  59. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_forge.php +254 -0
  60. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_result.php +169 -0
  61. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_utility.php +245 -0
  62. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/index.html +10 -0
  63. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_driver.php +671 -0
  64. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_forge.php +254 -0
  65. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_result.php +169 -0
  66. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_utility.php +123 -0
  67. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/index.html +10 -0
  68. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_driver.php +780 -0
  69. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_forge.php +248 -0
  70. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_result.php +249 -0
  71. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_utility.php +122 -0
  72. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/index.html +10 -0
  73. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_driver.php +639 -0
  74. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_forge.php +266 -0
  75. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_result.php +228 -0
  76. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_utility.php +148 -0
  77. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/index.html +10 -0
  78. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_driver.php +684 -0
  79. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_forge.php +248 -0
  80. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_result.php +169 -0
  81. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_utility.php +124 -0
  82. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/index.html +10 -0
  83. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php +657 -0
  84. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_forge.php +265 -0
  85. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_result.php +179 -0
  86. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_utility.php +141 -0
  87. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/index.html +10 -0
  88. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/index.html +10 -0
  89. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/texb.ttf +0 -0
  90. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/array_helper.php +78 -0
  91. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/compatibility_helper.php +498 -0
  92. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/cookie_helper.php +144 -0
  93. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/date_helper.php +611 -0
  94. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/directory_helper.php +84 -0
  95. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/download_helper.php +100 -0
  96. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/email_helper.php +62 -0
  97. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/file_helper.php +464 -0
  98. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/form_helper.php +1025 -0
  99. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/html_helper.php +416 -0
  100. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/index.html +10 -0
  101. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/inflector_helper.php +171 -0
  102. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/language_helper.php +58 -0
  103. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/number_helper.php +75 -0
  104. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/path_helper.php +72 -0
  105. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/security_helper.php +126 -0
  106. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/smiley_helper.php +273 -0
  107. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/string_helper.php +273 -0
  108. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/text_helper.php +462 -0
  109. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/typography_helper.php +71 -0
  110. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/url_helper.php +593 -0
  111. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/xml_helper.php +62 -0
  112. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/index.html +10 -0
  113. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +51 -0
  114. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/date_lang.php +60 -0
  115. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/db_lang.php +28 -0
  116. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/email_lang.php +24 -0
  117. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/form_validation_lang.php +24 -0
  118. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/ftp_lang.php +17 -0
  119. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/imglib_lang.php +24 -0
  120. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/index.html +10 -0
  121. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/number_lang.php +10 -0
  122. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/profiler_lang.php +19 -0
  123. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +17 -0
  124. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/unit_test_lang.php +24 -0
  125. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/upload_lang.php +22 -0
  126. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +24 -0
  127. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/index.html +10 -0
  128. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Benchmark.php +113 -0
  129. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Calendar.php +477 -0
  130. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Cart.php +550 -0
  131. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Config.php +244 -0
  132. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +127 -0
  133. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Email.php +2041 -0
  134. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Encrypt.php +484 -0
  135. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Exceptions.php +174 -0
  136. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Form_validation.php +1278 -0
  137. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Ftp.php +618 -0
  138. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Hooks.php +226 -0
  139. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Image_lib.php +1544 -0
  140. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +1067 -0
  141. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php +123 -0
  142. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Loader.php +1085 -0
  143. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Log.php +117 -0
  144. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +83 -0
  145. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Output.php +409 -0
  146. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Pagination.php +244 -0
  147. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Parser.php +173 -0
  148. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +392 -0
  149. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Router.php +389 -0
  150. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Session.php +758 -0
  151. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Sha1.php +251 -0
  152. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Table.php +440 -0
  153. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Trackback.php +547 -0
  154. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Typography.php +406 -0
  155. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/URI.php +586 -0
  156. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Unit_test.php +347 -0
  157. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Upload.php +970 -0
  158. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/User_agent.php +502 -0
  159. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +875 -0
  160. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpc.php +1421 -0
  161. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpcs.php +536 -0
  162. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Zip.php +359 -0
  163. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/index.html +10 -0
  164. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/logs/index.html +10 -0
  165. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +356 -0
  166. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/index.html +10 -0
  167. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +629 -0
  168. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +291 -0
  169. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/background.jpg +0 -0
  170. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/index.html +10 -0
  171. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/logo.jpg +0 -0
  172. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +10 -0
  173. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +32 -0
  174. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +9 -0
  175. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +33 -0
  176. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +10 -0
  177. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +29 -0
  178. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +10 -0
  179. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +8 -0
  180. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +143 -0
  181. data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +27 -0
  182. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/changelog.html +1080 -0
  183. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/active_record.html +757 -0
  184. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/caching.html +220 -0
  185. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/call_function.html +118 -0
  186. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/configuration.html +157 -0
  187. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/connecting.html +186 -0
  188. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/examples.html +217 -0
  189. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/fields.html +163 -0
  190. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/forge.html +234 -0
  191. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/helpers.html +151 -0
  192. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/index.html +99 -0
  193. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/queries.html +153 -0
  194. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/results.html +238 -0
  195. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/table_data.html +113 -0
  196. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/transactions.html +200 -0
  197. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/utilities.html +295 -0
  198. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/index.html +86 -0
  199. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/template.html +128 -0
  200. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/alternative_php.html +147 -0
  201. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/ancillary_classes.html +117 -0
  202. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/autoloader.html +101 -0
  203. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/caching.html +115 -0
  204. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/common_functions.html +119 -0
  205. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/controllers.html +385 -0
  206. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/core_classes.html +185 -0
  207. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/creating_libraries.html +298 -0
  208. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/credits.html +86 -0
  209. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/errors.html +138 -0
  210. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/helpers.html +185 -0
  211. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/hooks.html +167 -0
  212. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/libraries.html +94 -0
  213. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/managing_apps.html +133 -0
  214. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/models.html +251 -0
  215. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +127 -0
  216. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html +104 -0
  217. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/quick_reference.html +77 -0
  218. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/requirements.html +82 -0
  219. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/reserved_names.html +156 -0
  220. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/routing.html +176 -0
  221. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +147 -0
  222. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/security.html +153 -0
  223. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/styleguide.html +687 -0
  224. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/urls.html +151 -0
  225. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/views.html +274 -0
  226. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/array_helper.html +119 -0
  227. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +118 -0
  228. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +147 -0
  229. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/date_helper.html +408 -0
  230. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/directory_helper.html +143 -0
  231. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/download_helper.html +112 -0
  232. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/email_helper.html +102 -0
  233. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/file_helper.html +178 -0
  234. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/form_helper.html +484 -0
  235. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/html_helper.html +385 -0
  236. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/inflector_helper.html +151 -0
  237. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/language_helper.html +98 -0
  238. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/number_helper.html +107 -0
  239. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/path_helper.html +106 -0
  240. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/security_helper.html +125 -0
  241. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/smiley_helper.html +215 -0
  242. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/string_helper.html +176 -0
  243. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/text_helper.html +192 -0
  244. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/typography_helper.html +112 -0
  245. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/url_helper.html +289 -0
  246. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/xml_helper.html +105 -0
  247. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/appflowchart.gif +0 -0
  248. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/arrow.gif +0 -0
  249. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo.jpg +0 -0
  250. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo_flame.jpg +0 -0
  251. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_quick_ref.png +0 -0
  252. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
  253. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
  254. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
  255. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
  256. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/file.gif +0 -0
  257. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/folder.gif +0 -0
  258. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_bg_darker.jpg +0 -0
  259. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_separator_darker.jpg +0 -0
  260. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_toggle_darker.jpg +0 -0
  261. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/smile.gif +0 -0
  262. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/transparent.gif +0 -0
  263. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/index.html +99 -0
  264. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/downloads.html +105 -0
  265. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/index.html +97 -0
  266. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/troubleshooting.html +90 -0
  267. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_120.html +92 -0
  268. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_130.html +203 -0
  269. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_131.html +102 -0
  270. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_132.html +100 -0
  271. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_133.html +112 -0
  272. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_140.html +145 -0
  273. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_141.html +148 -0
  274. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_150.html +178 -0
  275. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_152.html +111 -0
  276. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_153.html +100 -0
  277. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_154.html +116 -0
  278. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_160.html +125 -0
  279. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_161.html +98 -0
  280. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_162.html +106 -0
  281. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_163.html +99 -0
  282. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_170.html +121 -0
  283. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_171.html +98 -0
  284. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_172.html +105 -0
  285. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_b11.html +144 -0
  286. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrading.html +101 -0
  287. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/benchmark.html +198 -0
  288. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/calendar.html +249 -0
  289. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/cart.html +346 -0
  290. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/config.html +181 -0
  291. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/email.html +307 -0
  292. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/encryption.html +182 -0
  293. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/file_uploading.html +451 -0
  294. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/form_validation.html +1221 -0
  295. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/ftp.html +303 -0
  296. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/image_lib.html +666 -0
  297. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/input.html +231 -0
  298. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/language.html +137 -0
  299. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/loader.html +214 -0
  300. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/output.html +145 -0
  301. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/pagination.html +218 -0
  302. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/parser.html +208 -0
  303. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/sessions.html +311 -0
  304. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/table.html +292 -0
  305. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/trackback.html +246 -0
  306. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/typography.html +160 -0
  307. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/unit_testing.html +205 -0
  308. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/uri.html +252 -0
  309. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/user_agent.html +201 -0
  310. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +740 -0
  311. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/xmlrpc.html +517 -0
  312. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/zip.html +278 -0
  313. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/license.html +107 -0
  314. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/hacks.txt +9 -0
  315. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.js +119 -0
  316. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +241 -0
  317. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/nav.js +139 -0
  318. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/prototype.lite.js +127 -0
  319. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/user_guide_menu.js +4 -0
  320. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/appflow.html +95 -0
  321. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/at_a_glance.html +172 -0
  322. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/cheatsheets.html +83 -0
  323. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/features.html +120 -0
  324. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/getting_started.html +92 -0
  325. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/goals.html +98 -0
  326. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/index.html +84 -0
  327. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/mvc.html +100 -0
  328. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/toc.html +209 -0
  329. data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/userguide.css +406 -0
  330. data/generators/ci_app/templates/README +1 -0
  331. data/generators/ci_controller/USAGE +2 -0
  332. data/generators/ci_controller/ci_controller_generator.rb +11 -0
  333. data/generators/ci_controller/templates/ci_controller.php.erb +15 -0
  334. data/generators/ci_controller/templates/ci_view.php.erb +8 -0
  335. data/generators/ci_layout/USAGE +2 -0
  336. data/generators/ci_layout/ci_layout_generator.rb +24 -0
  337. data/generators/ci_layout/templates/application_layout.php.erb +19 -0
  338. data/generators/ci_model/USAGE +2 -0
  339. data/generators/ci_model/ci_model_generator.rb +42 -0
  340. data/generators/ci_model/templates/ci_model.php.erb +15 -0
  341. data/generators/ci_model/templates/model.rb +5 -0
  342. data/generators/ci_model/templates/model_migration.rb.erb +16 -0
  343. data/init.rb +1 -0
  344. data/install.rb +1 -0
  345. data/lib/codeigniter_vender.rb +1 -0
  346. data/lib/tasks/app.rake +8 -0
  347. data/test/codeigniter_vender_test.rb +8 -0
  348. data/test/test_helper.rb +3 -0
  349. data/uninstall.rb +1 -0
  350. metadata +411 -0
@@ -0,0 +1,1085 @@
1
+ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
+ /**
3
+ * CodeIgniter
4
+ *
5
+ * An open source application development framework for PHP 4.3.2 or newer
6
+ *
7
+ * @package CodeIgniter
8
+ * @author ExpressionEngine Dev Team
9
+ * @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
10
+ * @license http://codeigniter.com/user_guide/license.html
11
+ * @link http://codeigniter.com
12
+ * @since Version 1.0
13
+ * @filesource
14
+ */
15
+
16
+ // ------------------------------------------------------------------------
17
+
18
+ /**
19
+ * Loader Class
20
+ *
21
+ * Loads views and files
22
+ *
23
+ * @package CodeIgniter
24
+ * @subpackage Libraries
25
+ * @author ExpressionEngine Dev Team
26
+ * @category Loader
27
+ * @link http://codeigniter.com/user_guide/libraries/loader.html
28
+ */
29
+ class CI_Loader {
30
+
31
+ // All these are set automatically. Don't mess with them.
32
+ var $_ci_ob_level;
33
+ var $_ci_view_path = '';
34
+ var $_ci_is_php5 = FALSE;
35
+ var $_ci_is_instance = FALSE; // Whether we should use $this or $CI =& get_instance()
36
+ var $_ci_cached_vars = array();
37
+ var $_ci_classes = array();
38
+ var $_ci_loaded_files = array();
39
+ var $_ci_models = array();
40
+ var $_ci_helpers = array();
41
+ var $_ci_plugins = array();
42
+ var $_ci_varmap = array('unit_test' => 'unit', 'user_agent' => 'agent');
43
+
44
+
45
+ /**
46
+ * Constructor
47
+ *
48
+ * Sets the path to the view files and gets the initial output buffering level
49
+ *
50
+ * @access public
51
+ */
52
+ function CI_Loader()
53
+ {
54
+ $this->_ci_is_php5 = (floor(phpversion()) >= 5) ? TRUE : FALSE;
55
+ $this->_ci_view_path = APPPATH.'views/';
56
+ $this->_ci_ob_level = ob_get_level();
57
+
58
+ log_message('debug', "Loader Class Initialized");
59
+ }
60
+
61
+ // --------------------------------------------------------------------
62
+
63
+ /**
64
+ * Class Loader
65
+ *
66
+ * This function lets users load and instantiate classes.
67
+ * It is designed to be called from a user's app controllers.
68
+ *
69
+ * @access public
70
+ * @param string the name of the class
71
+ * @param mixed the optional parameters
72
+ * @param string an optional object name
73
+ * @return void
74
+ */
75
+ function library($library = '', $params = NULL, $object_name = NULL)
76
+ {
77
+ if ($library == '')
78
+ {
79
+ return FALSE;
80
+ }
81
+
82
+ if ( ! is_null($params) AND ! is_array($params))
83
+ {
84
+ $params = NULL;
85
+ }
86
+
87
+ if (is_array($library))
88
+ {
89
+ foreach ($library as $class)
90
+ {
91
+ $this->_ci_load_class($class, $params, $object_name);
92
+ }
93
+ }
94
+ else
95
+ {
96
+ $this->_ci_load_class($library, $params, $object_name);
97
+ }
98
+
99
+ $this->_ci_assign_to_models();
100
+ }
101
+
102
+ // --------------------------------------------------------------------
103
+
104
+ /**
105
+ * Model Loader
106
+ *
107
+ * This function lets users load and instantiate models.
108
+ *
109
+ * @access public
110
+ * @param string the name of the class
111
+ * @param string name for the model
112
+ * @param bool database connection
113
+ * @return void
114
+ */
115
+ function model($model, $name = '', $db_conn = FALSE)
116
+ {
117
+ if (is_array($model))
118
+ {
119
+ foreach($model as $babe)
120
+ {
121
+ $this->model($babe);
122
+ }
123
+ return;
124
+ }
125
+
126
+ if ($model == '')
127
+ {
128
+ return;
129
+ }
130
+
131
+ // Is the model in a sub-folder? If so, parse out the filename and path.
132
+ if (strpos($model, '/') === FALSE)
133
+ {
134
+ $path = '';
135
+ }
136
+ else
137
+ {
138
+ $x = explode('/', $model);
139
+ $model = end($x);
140
+ unset($x[count($x)-1]);
141
+ $path = implode('/', $x).'/';
142
+ }
143
+
144
+ if ($name == '')
145
+ {
146
+ $name = $model;
147
+ }
148
+
149
+ if (in_array($name, $this->_ci_models, TRUE))
150
+ {
151
+ return;
152
+ }
153
+
154
+ $CI =& get_instance();
155
+ if (isset($CI->$name))
156
+ {
157
+ show_error('The model name you are loading is the name of a resource that is already being used: '.$name);
158
+ }
159
+
160
+ $model = strtolower($model);
161
+
162
+ if ( ! file_exists(APPPATH.'models/'.$path.$model.EXT))
163
+ {
164
+ show_error('Unable to locate the model you have specified: '.$model);
165
+ }
166
+
167
+ if ($db_conn !== FALSE AND ! class_exists('CI_DB'))
168
+ {
169
+ if ($db_conn === TRUE)
170
+ $db_conn = '';
171
+
172
+ $CI->load->database($db_conn, FALSE, TRUE);
173
+ }
174
+
175
+ if ( ! class_exists('Model'))
176
+ {
177
+ load_class('Model', FALSE);
178
+ }
179
+
180
+ require_once(APPPATH.'models/'.$path.$model.EXT);
181
+
182
+ $model = ucfirst($model);
183
+
184
+ $CI->$name = new $model();
185
+ $CI->$name->_assign_libraries();
186
+
187
+ $this->_ci_models[] = $name;
188
+ }
189
+
190
+ // --------------------------------------------------------------------
191
+
192
+ /**
193
+ * Database Loader
194
+ *
195
+ * @access public
196
+ * @param string the DB credentials
197
+ * @param bool whether to return the DB object
198
+ * @param bool whether to enable active record (this allows us to override the config setting)
199
+ * @return object
200
+ */
201
+ function database($params = '', $return = FALSE, $active_record = FALSE)
202
+ {
203
+ // Grab the super object
204
+ $CI =& get_instance();
205
+
206
+ // Do we even need to load the database class?
207
+ if (class_exists('CI_DB') AND $return == FALSE AND $active_record == FALSE AND isset($CI->db) AND is_object($CI->db))
208
+ {
209
+ return FALSE;
210
+ }
211
+
212
+ require_once(BASEPATH.'database/DB'.EXT);
213
+
214
+ if ($return === TRUE)
215
+ {
216
+ return DB($params, $active_record);
217
+ }
218
+
219
+ // Initialize the db variable. Needed to prevent
220
+ // reference errors with some configurations
221
+ $CI->db = '';
222
+
223
+ // Load the DB class
224
+ $CI->db =& DB($params, $active_record);
225
+
226
+ // Assign the DB object to any existing models
227
+ $this->_ci_assign_to_models();
228
+ }
229
+
230
+ // --------------------------------------------------------------------
231
+
232
+ /**
233
+ * Load the Utilities Class
234
+ *
235
+ * @access public
236
+ * @return string
237
+ */
238
+ function dbutil()
239
+ {
240
+ if ( ! class_exists('CI_DB'))
241
+ {
242
+ $this->database();
243
+ }
244
+
245
+ $CI =& get_instance();
246
+
247
+ // for backwards compatibility, load dbforge so we can extend dbutils off it
248
+ // this use is deprecated and strongly discouraged
249
+ $CI->load->dbforge();
250
+
251
+ require_once(BASEPATH.'database/DB_utility'.EXT);
252
+ require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility'.EXT);
253
+ $class = 'CI_DB_'.$CI->db->dbdriver.'_utility';
254
+
255
+ $CI->dbutil =& instantiate_class(new $class());
256
+
257
+ $CI->load->_ci_assign_to_models();
258
+ }
259
+
260
+ // --------------------------------------------------------------------
261
+
262
+ /**
263
+ * Load the Database Forge Class
264
+ *
265
+ * @access public
266
+ * @return string
267
+ */
268
+ function dbforge()
269
+ {
270
+ if ( ! class_exists('CI_DB'))
271
+ {
272
+ $this->database();
273
+ }
274
+
275
+ $CI =& get_instance();
276
+
277
+ require_once(BASEPATH.'database/DB_forge'.EXT);
278
+ require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge'.EXT);
279
+ $class = 'CI_DB_'.$CI->db->dbdriver.'_forge';
280
+
281
+ $CI->dbforge = new $class();
282
+
283
+ $CI->load->_ci_assign_to_models();
284
+ }
285
+
286
+ // --------------------------------------------------------------------
287
+
288
+ /**
289
+ * Load View
290
+ *
291
+ * This function is used to load a "view" file. It has three parameters:
292
+ *
293
+ * 1. The name of the "view" file to be included.
294
+ * 2. An associative array of data to be extracted for use in the view.
295
+ * 3. TRUE/FALSE - whether to return the data or load it. In
296
+ * some cases it's advantageous to be able to return data so that
297
+ * a developer can process it in some way.
298
+ *
299
+ * @access public
300
+ * @param string
301
+ * @param array
302
+ * @param bool
303
+ * @return void
304
+ */
305
+ function view($view, $vars = array(), $return = FALSE)
306
+ {
307
+ return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
308
+ }
309
+
310
+ // --------------------------------------------------------------------
311
+
312
+ /**
313
+ * Load File
314
+ *
315
+ * This is a generic file loader
316
+ *
317
+ * @access public
318
+ * @param string
319
+ * @param bool
320
+ * @return string
321
+ */
322
+ function file($path, $return = FALSE)
323
+ {
324
+ return $this->_ci_load(array('_ci_path' => $path, '_ci_return' => $return));
325
+ }
326
+
327
+ // --------------------------------------------------------------------
328
+
329
+ /**
330
+ * Set Variables
331
+ *
332
+ * Once variables are set they become available within
333
+ * the controller class and its "view" files.
334
+ *
335
+ * @access public
336
+ * @param array
337
+ * @return void
338
+ */
339
+ function vars($vars = array(), $val = '')
340
+ {
341
+ if ($val != '' AND is_string($vars))
342
+ {
343
+ $vars = array($vars => $val);
344
+ }
345
+
346
+ $vars = $this->_ci_object_to_array($vars);
347
+
348
+ if (is_array($vars) AND count($vars) > 0)
349
+ {
350
+ foreach ($vars as $key => $val)
351
+ {
352
+ $this->_ci_cached_vars[$key] = $val;
353
+ }
354
+ }
355
+ }
356
+
357
+ // --------------------------------------------------------------------
358
+
359
+ /**
360
+ * Load Helper
361
+ *
362
+ * This function loads the specified helper file.
363
+ *
364
+ * @access public
365
+ * @param mixed
366
+ * @return void
367
+ */
368
+ function helper($helpers = array())
369
+ {
370
+ if ( ! is_array($helpers))
371
+ {
372
+ $helpers = array($helpers);
373
+ }
374
+
375
+ foreach ($helpers as $helper)
376
+ {
377
+ $helper = strtolower(str_replace(EXT, '', str_replace('_helper', '', $helper)).'_helper');
378
+
379
+ if (isset($this->_ci_helpers[$helper]))
380
+ {
381
+ continue;
382
+ }
383
+
384
+ $ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.EXT;
385
+
386
+ // Is this a helper extension request?
387
+ if (file_exists($ext_helper))
388
+ {
389
+ $base_helper = BASEPATH.'helpers/'.$helper.EXT;
390
+
391
+ if ( ! file_exists($base_helper))
392
+ {
393
+ show_error('Unable to load the requested file: helpers/'.$helper.EXT);
394
+ }
395
+
396
+ include_once($ext_helper);
397
+ include_once($base_helper);
398
+ }
399
+ elseif (file_exists(APPPATH.'helpers/'.$helper.EXT))
400
+ {
401
+ include_once(APPPATH.'helpers/'.$helper.EXT);
402
+ }
403
+ else
404
+ {
405
+ if (file_exists(BASEPATH.'helpers/'.$helper.EXT))
406
+ {
407
+ include_once(BASEPATH.'helpers/'.$helper.EXT);
408
+ }
409
+ else
410
+ {
411
+ show_error('Unable to load the requested file: helpers/'.$helper.EXT);
412
+ }
413
+ }
414
+
415
+ $this->_ci_helpers[$helper] = TRUE;
416
+ log_message('debug', 'Helper loaded: '.$helper);
417
+ }
418
+ }
419
+
420
+ // --------------------------------------------------------------------
421
+
422
+ /**
423
+ * Load Helpers
424
+ *
425
+ * This is simply an alias to the above function in case the
426
+ * user has written the plural form of this function.
427
+ *
428
+ * @access public
429
+ * @param array
430
+ * @return void
431
+ */
432
+ function helpers($helpers = array())
433
+ {
434
+ $this->helper($helpers);
435
+ }
436
+
437
+ // --------------------------------------------------------------------
438
+
439
+ /**
440
+ * Load Plugin
441
+ *
442
+ * This function loads the specified plugin.
443
+ *
444
+ * @access public
445
+ * @param array
446
+ * @return void
447
+ */
448
+ function plugin($plugins = array())
449
+ {
450
+ if ( ! is_array($plugins))
451
+ {
452
+ $plugins = array($plugins);
453
+ }
454
+
455
+ foreach ($plugins as $plugin)
456
+ {
457
+ $plugin = strtolower(str_replace(EXT, '', str_replace('_pi', '', $plugin)).'_pi');
458
+
459
+ if (isset($this->_ci_plugins[$plugin]))
460
+ {
461
+ continue;
462
+ }
463
+
464
+ if (file_exists(APPPATH.'plugins/'.$plugin.EXT))
465
+ {
466
+ include_once(APPPATH.'plugins/'.$plugin.EXT);
467
+ }
468
+ else
469
+ {
470
+ if (file_exists(BASEPATH.'plugins/'.$plugin.EXT))
471
+ {
472
+ include_once(BASEPATH.'plugins/'.$plugin.EXT);
473
+ }
474
+ else
475
+ {
476
+ show_error('Unable to load the requested file: plugins/'.$plugin.EXT);
477
+ }
478
+ }
479
+
480
+ $this->_ci_plugins[$plugin] = TRUE;
481
+ log_message('debug', 'Plugin loaded: '.$plugin);
482
+ }
483
+ }
484
+
485
+ // --------------------------------------------------------------------
486
+
487
+ /**
488
+ * Load Plugins
489
+ *
490
+ * This is simply an alias to the above function in case the
491
+ * user has written the plural form of this function.
492
+ *
493
+ * @access public
494
+ * @param array
495
+ * @return void
496
+ */
497
+ function plugins($plugins = array())
498
+ {
499
+ $this->plugin($plugins);
500
+ }
501
+
502
+ // --------------------------------------------------------------------
503
+
504
+ /**
505
+ * Loads a language file
506
+ *
507
+ * @access public
508
+ * @param array
509
+ * @param string
510
+ * @return void
511
+ */
512
+ function language($file = array(), $lang = '')
513
+ {
514
+ $CI =& get_instance();
515
+
516
+ if ( ! is_array($file))
517
+ {
518
+ $file = array($file);
519
+ }
520
+
521
+ foreach ($file as $langfile)
522
+ {
523
+ $CI->lang->load($langfile, $lang);
524
+ }
525
+ }
526
+
527
+ /**
528
+ * Loads language files for scaffolding
529
+ *
530
+ * @access public
531
+ * @param string
532
+ * @return arra
533
+ */
534
+ function scaffold_language($file = '', $lang = '', $return = FALSE)
535
+ {
536
+ $CI =& get_instance();
537
+ return $CI->lang->load($file, $lang, $return);
538
+ }
539
+
540
+ // --------------------------------------------------------------------
541
+
542
+ /**
543
+ * Loads a config file
544
+ *
545
+ * @access public
546
+ * @param string
547
+ * @return void
548
+ */
549
+ function config($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
550
+ {
551
+ $CI =& get_instance();
552
+ $CI->config->load($file, $use_sections, $fail_gracefully);
553
+ }
554
+
555
+ // --------------------------------------------------------------------
556
+
557
+ /**
558
+ * Scaffolding Loader
559
+ *
560
+ * This initializing function works a bit different than the
561
+ * others. It doesn't load the class. Instead, it simply
562
+ * sets a flag indicating that scaffolding is allowed to be
563
+ * used. The actual scaffolding function below is
564
+ * called by the front controller based on whether the
565
+ * second segment of the URL matches the "secret" scaffolding
566
+ * word stored in the application/config/routes.php
567
+ *
568
+ * @access public
569
+ * @param string
570
+ * @return void
571
+ */
572
+ function scaffolding($table = '')
573
+ {
574
+ if ($table === FALSE)
575
+ {
576
+ show_error('You must include the name of the table you would like to access when you initialize scaffolding');
577
+ }
578
+
579
+ $CI =& get_instance();
580
+ $CI->_ci_scaffolding = TRUE;
581
+ $CI->_ci_scaff_table = $table;
582
+ }
583
+
584
+ // --------------------------------------------------------------------
585
+
586
+ /**
587
+ * Loader
588
+ *
589
+ * This function is used to load views and files.
590
+ * Variables are prefixed with _ci_ to avoid symbol collision with
591
+ * variables made available to view files
592
+ *
593
+ * @access private
594
+ * @param array
595
+ * @return void
596
+ */
597
+ function _ci_load($_ci_data)
598
+ {
599
+ // Set the default data variables
600
+ foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val)
601
+ {
602
+ $$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
603
+ }
604
+
605
+ // Set the path to the requested file
606
+ if ($_ci_path == '')
607
+ {
608
+ $_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
609
+ $_ci_file = ($_ci_ext == '') ? $_ci_view.EXT : $_ci_view;
610
+ $_ci_path = $this->_ci_view_path.$_ci_file;
611
+ }
612
+ else
613
+ {
614
+ $_ci_x = explode('/', $_ci_path);
615
+ $_ci_file = end($_ci_x);
616
+ }
617
+
618
+ if ( ! file_exists($_ci_path))
619
+ {
620
+ show_error('Unable to load the requested file: '.$_ci_file);
621
+ }
622
+
623
+ // This allows anything loaded using $this->load (views, files, etc.)
624
+ // to become accessible from within the Controller and Model functions.
625
+ // Only needed when running PHP 5
626
+
627
+ if ($this->_ci_is_instance())
628
+ {
629
+ $_ci_CI =& get_instance();
630
+ foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var)
631
+ {
632
+ if ( ! isset($this->$_ci_key))
633
+ {
634
+ $this->$_ci_key =& $_ci_CI->$_ci_key;
635
+ }
636
+ }
637
+ }
638
+
639
+ /*
640
+ * Extract and cache variables
641
+ *
642
+ * You can either set variables using the dedicated $this->load_vars()
643
+ * function or via the second parameter of this function. We'll merge
644
+ * the two types and cache them so that views that are embedded within
645
+ * other views can have access to these variables.
646
+ */
647
+ if (is_array($_ci_vars))
648
+ {
649
+ $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
650
+ }
651
+ extract($this->_ci_cached_vars);
652
+
653
+ /*
654
+ * Buffer the output
655
+ *
656
+ * We buffer the output for two reasons:
657
+ * 1. Speed. You get a significant speed boost.
658
+ * 2. So that the final rendered template can be
659
+ * post-processed by the output class. Why do we
660
+ * need post processing? For one thing, in order to
661
+ * show the elapsed page load time. Unless we
662
+ * can intercept the content right before it's sent to
663
+ * the browser and then stop the timer it won't be accurate.
664
+ */
665
+ ob_start();
666
+
667
+ // If the PHP installation does not support short tags we'll
668
+ // do a little string replacement, changing the short tags
669
+ // to standard PHP echo statements.
670
+
671
+ if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
672
+ {
673
+ echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
674
+ }
675
+ else
676
+ {
677
+ include($_ci_path); // include() vs include_once() allows for multiple views with the same name
678
+ }
679
+
680
+ log_message('debug', 'File loaded: '.$_ci_path);
681
+
682
+ // Return the file data if requested
683
+ if ($_ci_return === TRUE)
684
+ {
685
+ $buffer = ob_get_contents();
686
+ @ob_end_clean();
687
+ return $buffer;
688
+ }
689
+
690
+ /*
691
+ * Flush the buffer... or buff the flusher?
692
+ *
693
+ * In order to permit views to be nested within
694
+ * other views, we need to flush the content back out whenever
695
+ * we are beyond the first level of output buffering so that
696
+ * it can be seen and included properly by the first included
697
+ * template and any subsequent ones. Oy!
698
+ *
699
+ */
700
+ if (ob_get_level() > $this->_ci_ob_level + 1)
701
+ {
702
+ ob_end_flush();
703
+ }
704
+ else
705
+ {
706
+ // PHP 4 requires that we use a global
707
+ global $OUT;
708
+ $OUT->append_output(ob_get_contents());
709
+ @ob_end_clean();
710
+ }
711
+ }
712
+
713
+ // --------------------------------------------------------------------
714
+
715
+ /**
716
+ * Load class
717
+ *
718
+ * This function loads the requested class.
719
+ *
720
+ * @access private
721
+ * @param string the item that is being loaded
722
+ * @param mixed any additional parameters
723
+ * @param string an optional object name
724
+ * @return void
725
+ */
726
+ function _ci_load_class($class, $params = NULL, $object_name = NULL)
727
+ {
728
+ // Get the class name, and while we're at it trim any slashes.
729
+ // The directory path can be included as part of the class name,
730
+ // but we don't want a leading slash
731
+ $class = str_replace(EXT, '', trim($class, '/'));
732
+
733
+ // Was the path included with the class name?
734
+ // We look for a slash to determine this
735
+ $subdir = '';
736
+ if (strpos($class, '/') !== FALSE)
737
+ {
738
+ // explode the path so we can separate the filename from the path
739
+ $x = explode('/', $class);
740
+
741
+ // Reset the $class variable now that we know the actual filename
742
+ $class = end($x);
743
+
744
+ // Kill the filename from the array
745
+ unset($x[count($x)-1]);
746
+
747
+ // Glue the path back together, sans filename
748
+ $subdir = implode($x, '/').'/';
749
+ }
750
+
751
+ // We'll test for both lowercase and capitalized versions of the file name
752
+ foreach (array(ucfirst($class), strtolower($class)) as $class)
753
+ {
754
+ $subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.EXT;
755
+
756
+ // Is this a class extension request?
757
+ if (file_exists($subclass))
758
+ {
759
+ $baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;
760
+
761
+ if ( ! file_exists($baseclass))
762
+ {
763
+ log_message('error', "Unable to load the requested class: ".$class);
764
+ show_error("Unable to load the requested class: ".$class);
765
+ }
766
+
767
+ // Safety: Was the class already loaded by a previous call?
768
+ if (in_array($subclass, $this->_ci_loaded_files))
769
+ {
770
+ // Before we deem this to be a duplicate request, let's see
771
+ // if a custom object name is being supplied. If so, we'll
772
+ // return a new instance of the object
773
+ if ( ! is_null($object_name))
774
+ {
775
+ $CI =& get_instance();
776
+ if ( ! isset($CI->$object_name))
777
+ {
778
+ return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name);
779
+ }
780
+ }
781
+
782
+ $is_duplicate = TRUE;
783
+ log_message('debug', $class." class already loaded. Second attempt ignored.");
784
+ return;
785
+ }
786
+
787
+ include_once($baseclass);
788
+ include_once($subclass);
789
+ $this->_ci_loaded_files[] = $subclass;
790
+
791
+ return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name);
792
+ }
793
+
794
+ // Lets search for the requested library file and load it.
795
+ $is_duplicate = FALSE;
796
+ for ($i = 1; $i < 3; $i++)
797
+ {
798
+ $path = ($i % 2) ? APPPATH : BASEPATH;
799
+ $filepath = $path.'libraries/'.$subdir.$class.EXT;
800
+
801
+ // Does the file exist? No? Bummer...
802
+ if ( ! file_exists($filepath))
803
+ {
804
+ continue;
805
+ }
806
+
807
+ // Safety: Was the class already loaded by a previous call?
808
+ if (in_array($filepath, $this->_ci_loaded_files))
809
+ {
810
+ // Before we deem this to be a duplicate request, let's see
811
+ // if a custom object name is being supplied. If so, we'll
812
+ // return a new instance of the object
813
+ if ( ! is_null($object_name))
814
+ {
815
+ $CI =& get_instance();
816
+ if ( ! isset($CI->$object_name))
817
+ {
818
+ return $this->_ci_init_class($class, '', $params, $object_name);
819
+ }
820
+ }
821
+
822
+ $is_duplicate = TRUE;
823
+ log_message('debug', $class." class already loaded. Second attempt ignored.");
824
+ return;
825
+ }
826
+
827
+ include_once($filepath);
828
+ $this->_ci_loaded_files[] = $filepath;
829
+ return $this->_ci_init_class($class, '', $params, $object_name);
830
+ }
831
+ } // END FOREACH
832
+
833
+ // One last attempt. Maybe the library is in a subdirectory, but it wasn't specified?
834
+ if ($subdir == '')
835
+ {
836
+ $path = strtolower($class).'/'.$class;
837
+ return $this->_ci_load_class($path, $params);
838
+ }
839
+
840
+ // If we got this far we were unable to find the requested class.
841
+ // We do not issue errors if the load call failed due to a duplicate request
842
+ if ($is_duplicate == FALSE)
843
+ {
844
+ log_message('error', "Unable to load the requested class: ".$class);
845
+ show_error("Unable to load the requested class: ".$class);
846
+ }
847
+ }
848
+
849
+ // --------------------------------------------------------------------
850
+
851
+ /**
852
+ * Instantiates a class
853
+ *
854
+ * @access private
855
+ * @param string
856
+ * @param string
857
+ * @param string an optional object name
858
+ * @return null
859
+ */
860
+ function _ci_init_class($class, $prefix = '', $config = FALSE, $object_name = NULL)
861
+ {
862
+ // Is there an associated config file for this class?
863
+ if ($config === NULL)
864
+ {
865
+ // We test for both uppercase and lowercase, for servers that
866
+ // are case-sensitive with regard to file names
867
+ if (file_exists(APPPATH.'config/'.strtolower($class).EXT))
868
+ {
869
+ include_once(APPPATH.'config/'.strtolower($class).EXT);
870
+ }
871
+ elseif (file_exists(APPPATH.'config/'.ucfirst(strtolower($class)).EXT))
872
+ {
873
+ include_once(APPPATH.'config/'.ucfirst(strtolower($class)).EXT);
874
+ }
875
+ }
876
+
877
+ if ($prefix == '')
878
+ {
879
+ if (class_exists('CI_'.$class))
880
+ {
881
+ $name = 'CI_'.$class;
882
+ }
883
+ elseif (class_exists(config_item('subclass_prefix').$class))
884
+ {
885
+ $name = config_item('subclass_prefix').$class;
886
+ }
887
+ else
888
+ {
889
+ $name = $class;
890
+ }
891
+ }
892
+ else
893
+ {
894
+ $name = $prefix.$class;
895
+ }
896
+
897
+ // Is the class name valid?
898
+ if ( ! class_exists($name))
899
+ {
900
+ log_message('error', "Non-existent class: ".$name);
901
+ show_error("Non-existent class: ".$class);
902
+ }
903
+
904
+ // Set the variable name we will assign the class to
905
+ // Was a custom class name supplied? If so we'll use it
906
+ $class = strtolower($class);
907
+
908
+ if (is_null($object_name))
909
+ {
910
+ $classvar = ( ! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
911
+ }
912
+ else
913
+ {
914
+ $classvar = $object_name;
915
+ }
916
+
917
+ // Save the class name and object name
918
+ $this->_ci_classes[$class] = $classvar;
919
+
920
+ // Instantiate the class
921
+ $CI =& get_instance();
922
+ if ($config !== NULL)
923
+ {
924
+ $CI->$classvar = new $name($config);
925
+ }
926
+ else
927
+ {
928
+ $CI->$classvar = new $name;
929
+ }
930
+ }
931
+
932
+ // --------------------------------------------------------------------
933
+
934
+ /**
935
+ * Autoloader
936
+ *
937
+ * The config/autoload.php file contains an array that permits sub-systems,
938
+ * libraries, plugins, and helpers to be loaded automatically.
939
+ *
940
+ * @access private
941
+ * @param array
942
+ * @return void
943
+ */
944
+ function _ci_autoloader()
945
+ {
946
+ include_once(APPPATH.'config/autoload'.EXT);
947
+
948
+ if ( ! isset($autoload))
949
+ {
950
+ return FALSE;
951
+ }
952
+
953
+ // Load any custom config file
954
+ if (count($autoload['config']) > 0)
955
+ {
956
+ $CI =& get_instance();
957
+ foreach ($autoload['config'] as $key => $val)
958
+ {
959
+ $CI->config->load($val);
960
+ }
961
+ }
962
+
963
+ // Autoload plugins, helpers and languages
964
+ foreach (array('helper', 'plugin', 'language') as $type)
965
+ {
966
+ if (isset($autoload[$type]) AND count($autoload[$type]) > 0)
967
+ {
968
+ $this->$type($autoload[$type]);
969
+ }
970
+ }
971
+
972
+ // A little tweak to remain backward compatible
973
+ // The $autoload['core'] item was deprecated
974
+ if ( ! isset($autoload['libraries']))
975
+ {
976
+ $autoload['libraries'] = $autoload['core'];
977
+ }
978
+
979
+ // Load libraries
980
+ if (isset($autoload['libraries']) AND count($autoload['libraries']) > 0)
981
+ {
982
+ // Load the database driver.
983
+ if (in_array('database', $autoload['libraries']))
984
+ {
985
+ $this->database();
986
+ $autoload['libraries'] = array_diff($autoload['libraries'], array('database'));
987
+ }
988
+
989
+ // Load scaffolding
990
+ if (in_array('scaffolding', $autoload['libraries']))
991
+ {
992
+ $this->scaffolding();
993
+ $autoload['libraries'] = array_diff($autoload['libraries'], array('scaffolding'));
994
+ }
995
+
996
+ // Load all other libraries
997
+ foreach ($autoload['libraries'] as $item)
998
+ {
999
+ $this->library($item);
1000
+ }
1001
+ }
1002
+
1003
+ // Autoload models
1004
+ if (isset($autoload['model']))
1005
+ {
1006
+ $this->model($autoload['model']);
1007
+ }
1008
+
1009
+ }
1010
+
1011
+ // --------------------------------------------------------------------
1012
+
1013
+ /**
1014
+ * Assign to Models
1015
+ *
1016
+ * Makes sure that anything loaded by the loader class (libraries, plugins, etc.)
1017
+ * will be available to models, if any exist.
1018
+ *
1019
+ * @access private
1020
+ * @param object
1021
+ * @return array
1022
+ */
1023
+ function _ci_assign_to_models()
1024
+ {
1025
+ if (count($this->_ci_models) == 0)
1026
+ {
1027
+ return;
1028
+ }
1029
+
1030
+ if ($this->_ci_is_instance())
1031
+ {
1032
+ $CI =& get_instance();
1033
+ foreach ($this->_ci_models as $model)
1034
+ {
1035
+ $CI->$model->_assign_libraries();
1036
+ }
1037
+ }
1038
+ else
1039
+ {
1040
+ foreach ($this->_ci_models as $model)
1041
+ {
1042
+ $this->$model->_assign_libraries();
1043
+ }
1044
+ }
1045
+ }
1046
+
1047
+ // --------------------------------------------------------------------
1048
+
1049
+ /**
1050
+ * Object to Array
1051
+ *
1052
+ * Takes an object as input and converts the class variables to array key/vals
1053
+ *
1054
+ * @access private
1055
+ * @param object
1056
+ * @return array
1057
+ */
1058
+ function _ci_object_to_array($object)
1059
+ {
1060
+ return (is_object($object)) ? get_object_vars($object) : $object;
1061
+ }
1062
+
1063
+ // --------------------------------------------------------------------
1064
+
1065
+ /**
1066
+ * Determines whether we should use the CI instance or $this
1067
+ *
1068
+ * @access private
1069
+ * @return bool
1070
+ */
1071
+ function _ci_is_instance()
1072
+ {
1073
+ if ($this->_ci_is_php5 == TRUE)
1074
+ {
1075
+ return TRUE;
1076
+ }
1077
+
1078
+ global $CI;
1079
+ return (is_object($CI)) ? TRUE : FALSE;
1080
+ }
1081
+
1082
+ }
1083
+
1084
+ /* End of file Loader.php */
1085
+ /* Location: ./system/libraries/Loader.php */