codeigniter_vender 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/MIT-LICENSE +20 -0
- data/README +40 -0
- data/Rakefile +18 -0
- data/VERSION +1 -0
- data/codeigniter_vender.gemspec +389 -0
- data/generators/ci_app/USAGE +8 -0
- data/generators/ci_app/ci_app_generator.rb +12 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/license.txt +52 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/autoload.php +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/config.php +329 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/constants.php +41 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/database.php +55 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/doctypes.php +15 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/hooks.php +16 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/mimes.php +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/routes.php +48 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/smileys.php +66 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/user_agents.php +175 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_404.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_db.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_general.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_php.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/welcome_message.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/cache/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +69 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +56 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +280 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +93 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB.php +146 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_active_rec.php +1820 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_cache.php +195 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_driver.php +1366 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_forge.php +375 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_result.php +342 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_utility.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_driver.php +667 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_driver.php +670 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_utility.php +245 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_driver.php +671 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_driver.php +780 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_result.php +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_utility.php +122 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_driver.php +639 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_forge.php +266 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_result.php +228 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_utility.php +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_driver.php +684 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_utility.php +124 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php +657 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_forge.php +265 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_result.php +179 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_utility.php +141 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/texb.ttf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/array_helper.php +78 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/compatibility_helper.php +498 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/cookie_helper.php +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/date_helper.php +611 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/directory_helper.php +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/download_helper.php +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/email_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/file_helper.php +464 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/form_helper.php +1025 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/html_helper.php +416 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/inflector_helper.php +171 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/language_helper.php +58 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/number_helper.php +75 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/path_helper.php +72 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/security_helper.php +126 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/smiley_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/string_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/text_helper.php +462 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/typography_helper.php +71 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/url_helper.php +593 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/xml_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +51 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/date_lang.php +60 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/db_lang.php +28 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/email_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/form_validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/ftp_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/imglib_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/number_lang.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/profiler_lang.php +19 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/unit_test_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/upload_lang.php +22 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Benchmark.php +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Calendar.php +477 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Cart.php +550 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Config.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Email.php +2041 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Encrypt.php +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Exceptions.php +174 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Form_validation.php +1278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Ftp.php +618 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Hooks.php +226 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Image_lib.php +1544 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +1067 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Loader.php +1085 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Log.php +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Output.php +409 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Pagination.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Parser.php +173 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +392 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Router.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Session.php +758 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Sha1.php +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Table.php +440 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Trackback.php +547 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Typography.php +406 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/URI.php +586 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Unit_test.php +347 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Upload.php +970 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/User_agent.php +502 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +875 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpc.php +1421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpcs.php +536 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Zip.php +359 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/logs/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +356 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +629 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +291 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/background.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +32 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +33 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +29 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +8 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +27 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/changelog.html +1080 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/active_record.html +757 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/caching.html +220 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/call_function.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/configuration.html +157 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/connecting.html +186 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/examples.html +217 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/fields.html +163 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/forge.html +234 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/helpers.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/queries.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/results.html +238 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/table_data.html +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/transactions.html +200 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/utilities.html +295 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/index.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/template.html +128 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/alternative_php.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/ancillary_classes.html +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/autoloader.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/caching.html +115 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/common_functions.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/controllers.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/core_classes.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/creating_libraries.html +298 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/credits.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/errors.html +138 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/helpers.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/hooks.html +167 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/libraries.html +94 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/managing_apps.html +133 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/models.html +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html +104 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/quick_reference.html +77 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/requirements.html +82 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/reserved_names.html +156 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/routing.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/security.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/styleguide.html +687 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/urls.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/views.html +274 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/array_helper.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/date_helper.html +408 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/directory_helper.html +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/download_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/email_helper.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/file_helper.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/form_helper.html +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/html_helper.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/inflector_helper.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/language_helper.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/number_helper.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/path_helper.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/security_helper.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/smiley_helper.html +215 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/string_helper.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/text_helper.html +192 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/typography_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/url_helper.html +289 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/xml_helper.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/appflowchart.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/arrow.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo_flame.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_quick_ref.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/file.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/folder.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_bg_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_separator_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_toggle_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/smile.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/transparent.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/downloads.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/index.html +97 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/troubleshooting.html +90 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_120.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_130.html +203 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_131.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_132.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_133.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_140.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_141.html +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_150.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_152.html +111 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_153.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_154.html +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_160.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_161.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_162.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_163.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_170.html +121 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_171.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_172.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_b11.html +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrading.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/benchmark.html +198 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/calendar.html +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/cart.html +346 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/config.html +181 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/email.html +307 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/encryption.html +182 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/file_uploading.html +451 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/form_validation.html +1221 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/ftp.html +303 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/image_lib.html +666 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/input.html +231 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/language.html +137 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/loader.html +214 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/output.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/pagination.html +218 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/parser.html +208 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/sessions.html +311 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/table.html +292 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/trackback.html +246 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/typography.html +160 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/unit_testing.html +205 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/uri.html +252 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/user_agent.html +201 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +740 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/xmlrpc.html +517 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/zip.html +278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/license.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/hacks.txt +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.js +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +241 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/nav.js +139 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/prototype.lite.js +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/user_guide_menu.js +4 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/appflow.html +95 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/at_a_glance.html +172 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/cheatsheets.html +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/features.html +120 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/getting_started.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/goals.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/index.html +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/mvc.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/toc.html +209 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/userguide.css +406 -0
- data/generators/ci_app/templates/README +1 -0
- data/generators/ci_controller/USAGE +2 -0
- data/generators/ci_controller/ci_controller_generator.rb +11 -0
- data/generators/ci_controller/templates/ci_controller.php.erb +15 -0
- data/generators/ci_controller/templates/ci_view.php.erb +8 -0
- data/generators/ci_layout/USAGE +2 -0
- data/generators/ci_layout/ci_layout_generator.rb +24 -0
- data/generators/ci_layout/templates/application_layout.php.erb +19 -0
- data/generators/ci_model/USAGE +2 -0
- data/generators/ci_model/ci_model_generator.rb +42 -0
- data/generators/ci_model/templates/ci_model.php.erb +15 -0
- data/generators/ci_model/templates/model.rb +5 -0
- data/generators/ci_model/templates/model_migration.rb.erb +16 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/codeigniter_vender.rb +1 -0
- data/lib/tasks/app.rake +8 -0
- data/test/codeigniter_vender_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +1 -0
- metadata +411 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Error Handling : CodeIgniter User Guide</title>
|
|
7
|
+
|
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
|
15
|
+
|
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
|
18
|
+
<meta name='robots' content='all' />
|
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
|
21
|
+
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
|
|
25
|
+
<!-- START NAVIGATION -->
|
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
|
28
|
+
<div id="masthead">
|
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
30
|
+
<tr>
|
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</table>
|
|
35
|
+
</div>
|
|
36
|
+
<!-- END NAVIGATION -->
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<!-- START BREADCRUMB -->
|
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
41
|
+
<tr>
|
|
42
|
+
<td id="breadcrumb">
|
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
|
45
|
+
Error Handling
|
|
46
|
+
</td>
|
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
<!-- END BREADCRUMB -->
|
|
51
|
+
|
|
52
|
+
<br clear="all" />
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<!-- START CONTENT -->
|
|
56
|
+
<div id="content">
|
|
57
|
+
|
|
58
|
+
<h1>Error Handling</h1>
|
|
59
|
+
|
|
60
|
+
<p>CodeIgniter lets you build error reporting into your applications using the functions described below.
|
|
61
|
+
In addition, it has an error logging class that permits error and debugging messages to be saved as text files.</p>
|
|
62
|
+
|
|
63
|
+
<p class="important"><strong>Note:</strong> By default, CodeIgniter displays all PHP errors. You might
|
|
64
|
+
wish to change this behavior once your development is complete. You'll find the <dfn>error_reporting()</dfn>
|
|
65
|
+
function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files
|
|
66
|
+
from being written if there are errors.</p>
|
|
67
|
+
|
|
68
|
+
<p>Unlike most systems in CodeIgniter, the error functions are simple procedural interfaces that are available
|
|
69
|
+
globally throughout the application. This approach permits error messages to get triggered without having to worry
|
|
70
|
+
about class/function scoping.</p>
|
|
71
|
+
|
|
72
|
+
<p>The following functions let you generate errors:</p>
|
|
73
|
+
|
|
74
|
+
<h2>show_error('<var>message</var>' [, int <var>$status_code</var>= 500 ] )</h2>
|
|
75
|
+
<p>This function will display the error message supplied to it using the following error template:</p>
|
|
76
|
+
<p><dfn>application/errors/</dfn><kbd>error_general.php</kbd></p>
|
|
77
|
+
<p>The optional parameter $status_code determines what HTTP status code should be sent with the error.</p>
|
|
78
|
+
|
|
79
|
+
<h2>show_404('<var>page</var>')</h2>
|
|
80
|
+
<p>This function will display the 404 error message supplied to it using the following error template:</p>
|
|
81
|
+
<p><dfn>application/errors/</dfn><kbd>error_404.php</kbd></p>
|
|
82
|
+
|
|
83
|
+
<p>The function expects the string passed to it to be the file path to the page that isn't found.
|
|
84
|
+
Note that CodeIgniter automatically shows 404 messages if controllers are not found.</p>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<h2>log_message('<var>level</var>', '<samp>message</samp>')</h2>
|
|
88
|
+
|
|
89
|
+
<p>This function lets you write messages to your log files. You must supply one of three "levels"
|
|
90
|
+
in the first parameter, indicating what type of message it is (debug, error, info), with the message
|
|
91
|
+
itself in the second parameter. Example:</p>
|
|
92
|
+
|
|
93
|
+
<code>
|
|
94
|
+
if ($some_var == "")<br />
|
|
95
|
+
{<br />
|
|
96
|
+
log_message('error', 'Some variable did not contain a value.');<br />
|
|
97
|
+
}<br />
|
|
98
|
+
else<br />
|
|
99
|
+
{<br />
|
|
100
|
+
log_message('debug', 'Some variable was correctly set');<br />
|
|
101
|
+
}<br />
|
|
102
|
+
<br />
|
|
103
|
+
log_message('info', 'The purpose of some variable is to provide some value.');<br />
|
|
104
|
+
</code>
|
|
105
|
+
|
|
106
|
+
<p>There are three message types:</p>
|
|
107
|
+
|
|
108
|
+
<ol>
|
|
109
|
+
<li>Error Messages. These are actual errors, such as PHP errors or user errors.</li>
|
|
110
|
+
<li>Debug Messages. These are messages that assist in debugging. For example, if a class has been initialized, you could log this as debugging info.</li>
|
|
111
|
+
<li>Informational Messages. These are the lowest priority messages, simply giving information regarding some process. CodeIgniter doesn't natively generate any info messages but you may want to in your application.</li>
|
|
112
|
+
</ol>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<p class="important"><strong>Note:</strong> In order for the log file to actually be written, the
|
|
116
|
+
"logs" folder must be writable. In addition, you must set the "threshold" for logging.
|
|
117
|
+
You might, for example, only want error messages to be logged, and not the other two types.
|
|
118
|
+
If you set it to zero logging will be disabled.</p>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
<!-- END CONTENT -->
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<div id="footer">
|
|
127
|
+
<p>
|
|
128
|
+
Previous Topic: <a href="routing.html">URI Routing</a>
|
|
129
|
+
·
|
|
130
|
+
<a href="#top">Top of Page</a> ·
|
|
131
|
+
<a href="../index.html">User Guide Home</a> ·
|
|
132
|
+
Next Topic: <a href="caching.html">Page Caching</a>
|
|
133
|
+
</p>
|
|
134
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
</body>
|
|
138
|
+
</html>
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Helper Functions : CodeIgniter User Guide</title>
|
|
7
|
+
|
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
|
15
|
+
|
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
|
18
|
+
<meta name='robots' content='all' />
|
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
|
21
|
+
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
|
|
25
|
+
<!-- START NAVIGATION -->
|
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
|
28
|
+
<div id="masthead">
|
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
30
|
+
<tr>
|
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</table>
|
|
35
|
+
</div>
|
|
36
|
+
<!-- END NAVIGATION -->
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<!-- START BREADCRUMB -->
|
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
41
|
+
<tr>
|
|
42
|
+
<td id="breadcrumb">
|
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
|
45
|
+
Helper Functions
|
|
46
|
+
</td>
|
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
<!-- END BREADCRUMB -->
|
|
51
|
+
|
|
52
|
+
<br clear="all" />
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<!-- START CONTENT -->
|
|
56
|
+
<div id="content">
|
|
57
|
+
|
|
58
|
+
<h1>Helper Functions</h1>
|
|
59
|
+
|
|
60
|
+
<p>Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular
|
|
61
|
+
category. There are <dfn>URL Helpers</dfn>, that assist in creating links, there are <dfn>Form Helpers</dfn>
|
|
62
|
+
that help you create form elements, <dfn>Text Helpers</dfn> perform various text formatting routines,
|
|
63
|
+
<dfn>Cookie Helpers</dfn> set and read cookies, <dfn>File Helpers</dfn> help you deal with files, etc.
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<p>Unlike most other systems in CodeIgniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions.
|
|
67
|
+
Each helper function performs one specific task, with no dependence on other functions.</p>
|
|
68
|
+
|
|
69
|
+
<p>CodeIgniter does not load Helper Files by default, so the first step in using
|
|
70
|
+
a Helper is to load it. Once loaded, it becomes globally available in your <a href="../general/controllers.html">controller</a> and <a href="../general/views.html">views</a>.</p>
|
|
71
|
+
|
|
72
|
+
<p>Helpers are typically stored in your <dfn>system/helpers</dfn>, or <dfn>system/application/helpers </dfn>directory. CodeIgniter will look first in your <dfn>system/application/helpers</dfn>
|
|
73
|
+
directory. If the directory does not exist or the specified helper is not located there CI will instead look in your global
|
|
74
|
+
<dfn>system/helpers</dfn> folder.</p>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<h2>Loading a Helper</h2>
|
|
78
|
+
|
|
79
|
+
<p>Loading a helper file is quite simple using the following function:</p>
|
|
80
|
+
|
|
81
|
+
<code>$this->load->helper('<var>name</var>');</code>
|
|
82
|
+
|
|
83
|
+
<p>Where <var>name</var> is the file name of the helper, without the .php file extension or the "helper" part.</p>
|
|
84
|
+
|
|
85
|
+
<p>For example, to load the <dfn>URL Helper</dfn> file, which is named <var>url_helper.php</var>, you would do this:</p>
|
|
86
|
+
|
|
87
|
+
<code>$this->load->helper('<var>url</var>');</code>
|
|
88
|
+
|
|
89
|
+
<p>A helper can be loaded anywhere within your controller functions (or even within your View files, although that's not a good practice),
|
|
90
|
+
as long as you load it before you use it. You can load your helpers in your controller constructor so that they become available
|
|
91
|
+
automatically in any function, or you can load a helper in a specific function that needs it.</p>
|
|
92
|
+
|
|
93
|
+
<p class="important">Note: The Helper loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.</p>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<h2>Loading Multiple Helpers</h2>
|
|
97
|
+
|
|
98
|
+
<p>If you need to load more than one helper you can specify them in an array, like this:</p>
|
|
99
|
+
|
|
100
|
+
<code>$this->load->helper( <samp>array(</samp>'<var>helper1</var>', '<var>helper2</var>', '<var>helper3</var>'<samp>)</samp> );</code>
|
|
101
|
+
|
|
102
|
+
<h2>Auto-loading Helpers</h2>
|
|
103
|
+
|
|
104
|
+
<p>If you find that you need a particular helper globally throughout your application, you can tell CodeIgniter to auto-load it during system initialization.
|
|
105
|
+
This is done by opening the <var>application/config/autoload.php</var> file and adding the helper to the autoload array.</p>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<h2>Using a Helper</h2>
|
|
109
|
+
|
|
110
|
+
<p>Once you've loaded the Helper File containing the function you intend to use, you'll call it the way you would a standard PHP function.</p>
|
|
111
|
+
|
|
112
|
+
<p>For example, to create a link using the <dfn>anchor()</dfn> function in one of your view files you would do this:</p>
|
|
113
|
+
|
|
114
|
+
<code><?php echo anchor('blog/comments', 'Click Here');?></code>
|
|
115
|
+
|
|
116
|
+
<p>Where "Click Here" is the name of the link, and "blog/comments" is the URI to the controller/function you wish to link to.</p>
|
|
117
|
+
|
|
118
|
+
<h2>"Extending" Helpers</h2>
|
|
119
|
+
|
|
120
|
+
<p>To "extend" Helpers, create a file in your <dfn>application/helpers/</dfn> folder with an identical name to the existing Helper, but prefixed with <kbd>MY_</kbd> (this item is configurable. See below.).</p>
|
|
121
|
+
|
|
122
|
+
<p>If all you need to do is add some functionality to an existing helper - perhaps add a function or two, or change how a particular
|
|
123
|
+
helper function operates - then it's overkill to replace the entire helper with your version. In this case it's better to simply
|
|
124
|
+
"extend" the Helper. The term "extend" is used loosely since Helper functions are procedural and discrete and cannot be extended
|
|
125
|
+
in the traditional programmatic sense. Under the hood, this gives you the ability to add to the functions a Helper provides,
|
|
126
|
+
or to modify how the native Helper functions operate.</p>
|
|
127
|
+
|
|
128
|
+
<p>For example, to extend the native <kbd>Array Helper</kbd> you'll create a file named <dfn>application/helpers/</dfn><kbd>MY_array_helper.php</kbd>, and add or override functions:</p>
|
|
129
|
+
|
|
130
|
+
<code>
|
|
131
|
+
// any_in_array() is not in the Array Helper, so it defines a new function<br />
|
|
132
|
+
function any_in_array($needle, $haystack)<br />
|
|
133
|
+
{<br />
|
|
134
|
+
$needle = (is_array($needle)) ? $needle : array($needle);<br />
|
|
135
|
+
<br />
|
|
136
|
+
foreach ($needle as $item)<br />
|
|
137
|
+
{<br />
|
|
138
|
+
if (in_array($item, $haystack))<br />
|
|
139
|
+
{<br />
|
|
140
|
+
return TRUE;<br />
|
|
141
|
+
}<br />
|
|
142
|
+
}<br />
|
|
143
|
+
<br />
|
|
144
|
+
return FALSE;<br />
|
|
145
|
+
}<br />
|
|
146
|
+
<br />
|
|
147
|
+
// random_element() is included in Array Helper, so it overrides the native function<br />
|
|
148
|
+
function random_element($array)<br />
|
|
149
|
+
{<br />
|
|
150
|
+
shuffle($array);<br />
|
|
151
|
+
return array_pop($array);<br />
|
|
152
|
+
}<br />
|
|
153
|
+
</code>
|
|
154
|
+
|
|
155
|
+
<h3>Setting Your Own Prefix</h3>
|
|
156
|
+
|
|
157
|
+
<p>The filename prefix for "extending" Helpers is the same used to extend libraries and Core classes. To set your own prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p>
|
|
158
|
+
|
|
159
|
+
<code>$config['subclass_prefix'] = 'MY_';</code>
|
|
160
|
+
|
|
161
|
+
<p>Please note that all native CodeIgniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<h2>Now What?</h2>
|
|
165
|
+
|
|
166
|
+
<p>In the Table of Contents you'll find a list of all the available Helper Files. Browse each one to see what they do.</p>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
<!-- END CONTENT -->
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div id="footer">
|
|
174
|
+
<p>
|
|
175
|
+
Previous Topic: <a href="models.html">Models</a>
|
|
176
|
+
·
|
|
177
|
+
<a href="#top">Top of Page</a> ·
|
|
178
|
+
<a href="../index.html">User Guide Home</a> ·
|
|
179
|
+
Next Topic: <a href="plugins.html">Plugins</a>
|
|
180
|
+
</p>
|
|
181
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
</body>
|
|
185
|
+
</html>
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Hooks : CodeIgniter User Guide</title>
|
|
7
|
+
|
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
|
15
|
+
|
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
|
18
|
+
<meta name='robots' content='all' />
|
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
|
21
|
+
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
|
|
25
|
+
<!-- START NAVIGATION -->
|
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
|
28
|
+
<div id="masthead">
|
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
30
|
+
<tr>
|
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</table>
|
|
35
|
+
</div>
|
|
36
|
+
<!-- END NAVIGATION -->
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<!-- START BREADCRUMB -->
|
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
41
|
+
<tr>
|
|
42
|
+
<td id="breadcrumb">
|
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
|
45
|
+
Hooks - Extending the Framework Core
|
|
46
|
+
</td>
|
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
<!-- END BREADCRUMB -->
|
|
51
|
+
|
|
52
|
+
<br clear="all" />
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<!-- START CONTENT -->
|
|
56
|
+
<div id="content">
|
|
57
|
+
|
|
58
|
+
<h1>Hooks - Extending the Framework Core</h1>
|
|
59
|
+
|
|
60
|
+
<p>CodeIgniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files.
|
|
61
|
+
When CodeIgniter runs it follows a specific execution process, diagramed in the <a href="../overview/appflow.html">Application Flow</a> page.
|
|
62
|
+
There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process.
|
|
63
|
+
For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of
|
|
64
|
+
your own scripts in some other location.
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
<h2>Enabling Hooks</h2>
|
|
68
|
+
|
|
69
|
+
<p>The hooks feature can be globally enabled/disabled by setting the following item in the <kbd>application/config/config.php</kbd> file:</p>
|
|
70
|
+
|
|
71
|
+
<code>$config['enable_hooks'] = TRUE;</code>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<h2>Defining a Hook</h2>
|
|
75
|
+
|
|
76
|
+
<p>Hooks are defined in <dfn>application/config/hooks.php</dfn> file. Each hook is specified as an array with this prototype:</p>
|
|
77
|
+
|
|
78
|
+
<code>
|
|
79
|
+
$hook['pre_controller'] = array(<br />
|
|
80
|
+
'class' => 'MyClass',<br />
|
|
81
|
+
'function' => 'Myfunction',<br />
|
|
82
|
+
'filename' => 'Myclass.php',<br />
|
|
83
|
+
'filepath' => 'hooks',<br />
|
|
84
|
+
'params' => array('beer', 'wine', 'snacks')<br />
|
|
85
|
+
);</code>
|
|
86
|
+
|
|
87
|
+
<p><strong>Notes:</strong><br />The array index correlates to the name of the particular hook point you want to
|
|
88
|
+
use. In the above example the hook point is <kbd>pre_controller</kbd>. A list of hook points is found below.
|
|
89
|
+
The following items should be defined in your associative hook array:</p>
|
|
90
|
+
|
|
91
|
+
<ul>
|
|
92
|
+
<li><strong>class</strong> The name of the class you wish to invoke. If you prefer to use a procedural function instead of a class, leave this item blank.</li>
|
|
93
|
+
<li><strong>function</strong> The function name you wish to call.</li>
|
|
94
|
+
<li><strong>filename</strong> The file name containing your class/function.</li>
|
|
95
|
+
<li><strong>filepath</strong> The name of the directory containing your script. Note: Your script must be located in a directory INSIDE your <kbd>application</kbd> folder, so the file path is relative to that folder. For example, if your script is located in <dfn>application/hooks</dfn>, you will simply use <samp>hooks</samp> as your filepath. If your script is located in <dfn>application/hooks/utilities</dfn> you will use <samp>hooks/utilities</samp> as your filepath. No trailing slash.</li>
|
|
96
|
+
<li><strong>params</strong> Any parameters you wish to pass to your script. This item is optional.</li>
|
|
97
|
+
</ul>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<h2>Multiple Calls to the Same Hook</h2>
|
|
101
|
+
|
|
102
|
+
<p>If want to use the same hook point with more then one script, simply make your array declaration multi-dimensional, like this:</p>
|
|
103
|
+
|
|
104
|
+
<code>
|
|
105
|
+
$hook['pre_controller']<kbd>[]</kbd> = array(<br />
|
|
106
|
+
'class' => 'MyClass',<br />
|
|
107
|
+
'function' => 'Myfunction',<br />
|
|
108
|
+
'filename' => 'Myclass.php',<br />
|
|
109
|
+
'filepath' => 'hooks',<br />
|
|
110
|
+
'params' => array('beer', 'wine', 'snacks')<br />
|
|
111
|
+
);<br />
|
|
112
|
+
<br />
|
|
113
|
+
$hook['pre_controller']<kbd>[]</kbd> = array(<br />
|
|
114
|
+
'class' => 'MyOtherClass',<br />
|
|
115
|
+
'function' => 'MyOtherfunction',<br />
|
|
116
|
+
'filename' => 'Myotherclass.php',<br />
|
|
117
|
+
'filepath' => 'hooks',<br />
|
|
118
|
+
'params' => array('red', 'yellow', 'blue')<br />
|
|
119
|
+
);</code>
|
|
120
|
+
|
|
121
|
+
<p>Notice the brackets after each array index:</p>
|
|
122
|
+
|
|
123
|
+
<code>$hook['pre_controller']<kbd>[]</kbd></code>
|
|
124
|
+
|
|
125
|
+
<p>This permits you to have the same hook point with multiple scripts. The order you define your array will be the execution order.</p>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<h2>Hook Points</h2>
|
|
129
|
+
|
|
130
|
+
<p>The following is a list of available hook points.</p>
|
|
131
|
+
|
|
132
|
+
<ul>
|
|
133
|
+
<li><strong>pre_system</strong><br />
|
|
134
|
+
Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.</li>
|
|
135
|
+
<li><strong>pre_controller</strong><br />
|
|
136
|
+
Called immediately prior to any of your controllers being called. All base classes, routing, and security checks have been done.</li>
|
|
137
|
+
<li><strong>post_controller_constructor</strong><br />
|
|
138
|
+
Called immediately after your controller is instantiated, but prior to any method calls happening.</li>
|
|
139
|
+
<li><strong>post_controller</strong><br />
|
|
140
|
+
Called immediately after your controller is fully executed.</li>
|
|
141
|
+
<li><strong>display_override</strong><br />
|
|
142
|
+
Overrides the <dfn>_display()</dfn> function, used to send the finalized page to the web browser at the end of system execution. This permits you to
|
|
143
|
+
use your own display methodology. Note that you will need to reference the CI superobject with <dfn>$this->CI =& get_instance()</dfn> and then the finalized data will be available by calling <dfn>$this->CI->output->get_output()</dfn></li>
|
|
144
|
+
<li><strong>cache_override</strong><br />
|
|
145
|
+
Enables you to call your own function instead of the <dfn>_display_cache()</dfn> function in the output class. This permits you to use your own cache display mechanism.</li>
|
|
146
|
+
<li><strong>scaffolding_override</strong><br />
|
|
147
|
+
Permits a scaffolding request to trigger your own script instead.</li>
|
|
148
|
+
<li><strong>post_system</strong><br />
|
|
149
|
+
Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.</li>
|
|
150
|
+
</ul>
|
|
151
|
+
</div>
|
|
152
|
+
<!-- END CONTENT -->
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<div id="footer">
|
|
156
|
+
<p>
|
|
157
|
+
Previous Topic: <a href="core_classes.html">Creating Core Classes</a>
|
|
158
|
+
·
|
|
159
|
+
<a href="#top">Top of Page</a> ·
|
|
160
|
+
<a href="../index.html">User Guide Home</a> ·
|
|
161
|
+
Next Topic: <a href="autoloader.html">Auto-loading Resources</a>
|
|
162
|
+
</p>
|
|
163
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
</body>
|
|
167
|
+
</html>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Using CodeIgniter Libraries : CodeIgniter User Guide</title>
|
|
7
|
+
|
|
8
|
+
<style type='text/css' media='all'>@import url('../userguide.css');</style>
|
|
9
|
+
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript" src="../nav/nav.js"></script>
|
|
12
|
+
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
|
13
|
+
<script type="text/javascript" src="../nav/moo.fx.js"></script>
|
|
14
|
+
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
|
|
15
|
+
|
|
16
|
+
<meta http-equiv='expires' content='-1' />
|
|
17
|
+
<meta http-equiv= 'pragma' content='no-cache' />
|
|
18
|
+
<meta name='robots' content='all' />
|
|
19
|
+
<meta name='author' content='ExpressionEngine Dev Team' />
|
|
20
|
+
<meta name='description' content='CodeIgniter User Guide' />
|
|
21
|
+
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
|
|
25
|
+
<!-- START NAVIGATION -->
|
|
26
|
+
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
|
27
|
+
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
|
28
|
+
<div id="masthead">
|
|
29
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
30
|
+
<tr>
|
|
31
|
+
<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
|
|
32
|
+
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</table>
|
|
35
|
+
</div>
|
|
36
|
+
<!-- END NAVIGATION -->
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<!-- START BREADCRUMB -->
|
|
40
|
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
|
41
|
+
<tr>
|
|
42
|
+
<td id="breadcrumb">
|
|
43
|
+
<a href="http://codeigniter.com/">CodeIgniter Home</a> ›
|
|
44
|
+
<a href="../index.html">User Guide Home</a> ›
|
|
45
|
+
Using CodeIgniter Libraries
|
|
46
|
+
</td>
|
|
47
|
+
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
<!-- END BREADCRUMB -->
|
|
51
|
+
|
|
52
|
+
<br clear="all" />
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<!-- START CONTENT -->
|
|
56
|
+
<div id="content">
|
|
57
|
+
|
|
58
|
+
<h1>Using CodeIgniter Libraries</h1>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p>All of the available libraries are located in your <dfn>system/libraries</dfn> folder.
|
|
62
|
+
In most cases, to use one of these classes involves initializing it within a <a href="controllers.html">controller</a> using the following initialization function:</p>
|
|
63
|
+
|
|
64
|
+
<code>$this->load->library('<var>class name</var>'); </code>
|
|
65
|
+
|
|
66
|
+
<p>Where <var>class name</var> is the name of the class you want to invoke. For example, to load the validation class you would do this:</p>
|
|
67
|
+
|
|
68
|
+
<code>$this->load->library('<var>validation</var>'); </code>
|
|
69
|
+
|
|
70
|
+
<p>Once initialized you can use it as indicated in the user guide page corresponding to that class.</p>
|
|
71
|
+
|
|
72
|
+
<h2>Creating Your Own Libraries</h2>
|
|
73
|
+
|
|
74
|
+
<p>Please read the section of the user guide that discusses how to <a href="creating_libraries.html">create your own libraries</a></p>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
<!-- END CONTENT -->
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<div id="footer">
|
|
83
|
+
<p>
|
|
84
|
+
Previous Topic: <a href="plugins.html">Plugins</a>
|
|
85
|
+
·
|
|
86
|
+
<a href="#top">Top of Page</a> ·
|
|
87
|
+
<a href="../index.html">User Guide Home</a> ·
|
|
88
|
+
Next Topic: <a href="creating_libraries.html">Creating Libraries</a>
|
|
89
|
+
</p>
|
|
90
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
</body>
|
|
94
|
+
</html>
|