codeigniter_vender 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,231 @@
|
|
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>Input Class : 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
|
+
Input and Security Class
|
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
|
+
|
59
|
+
<h1>Input Class</h1>
|
60
|
+
|
61
|
+
<p>The Input Class serves two purposes:</p>
|
62
|
+
|
63
|
+
<ol>
|
64
|
+
<li>It pre-processes global input data for security.</li>
|
65
|
+
<li>It provides some helper functions for fetching input data and pre-processing it.</li>
|
66
|
+
</ol>
|
67
|
+
|
68
|
+
<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p>
|
69
|
+
|
70
|
+
|
71
|
+
<h2>Security Filtering</h2>
|
72
|
+
|
73
|
+
<p>The security filtering function is called automatically when a new <a href="../general/controllers.html">controller</a> is invoked. It does the following:</p>
|
74
|
+
|
75
|
+
<ul>
|
76
|
+
<li>Destroys the global GET array. Since CodeIgniter does not utilize GET strings, there is no reason to allow it.</li>
|
77
|
+
<li>Destroys all global variables in the event register_globals is turned on.</li>
|
78
|
+
<li>Filters the POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters.</li>
|
79
|
+
<li>Provides XSS (Cross-site Scripting Hacks) filtering. This can be enabled globally, or upon request.</li>
|
80
|
+
<li>Standardizes newline characters to \n</li>
|
81
|
+
</ul>
|
82
|
+
|
83
|
+
|
84
|
+
<h2>XSS Filtering</h2>
|
85
|
+
|
86
|
+
<p>CodeIgniter comes with a Cross Site Scripting Hack prevention filter which can either run automatically to filter
|
87
|
+
all POST and COOKIE data that is encountered, or you can run it on a per item basis. By default it does <strong>not</strong>
|
88
|
+
run globally since it requires a bit of processing overhead, and since you may not need it in all cases.</p>
|
89
|
+
|
90
|
+
<p>The XSS filter looks for commonly used techniques to trigger Javascript or other types of code that attempt to hijack cookies
|
91
|
+
or do other malicious things. If anything disallowed is encountered it is rendered safe by converting the data to character entities.</p>
|
92
|
+
|
93
|
+
<p>
|
94
|
+
Note: This function should only be used to deal with data upon submission. It's not something that should be used for general runtime processing since it requires a fair amount of processing overhead.</p>
|
95
|
+
|
96
|
+
|
97
|
+
<p>To filter data through the XSS filter use this function:</p>
|
98
|
+
|
99
|
+
<h2>$this->input->xss_clean()</h2>
|
100
|
+
|
101
|
+
<p>Here is an usage example:</p>
|
102
|
+
|
103
|
+
<code>$data = $this->input->xss_clean($data);</code>
|
104
|
+
|
105
|
+
<p>If you want the filter to run automatically every time it encounters POST or COOKIE data you can enable it by opening your
|
106
|
+
<kbd>application/config/config.php</kbd> file and setting this:</p>
|
107
|
+
|
108
|
+
<code>$config['global_xss_filtering'] = TRUE;</code>
|
109
|
+
|
110
|
+
<p>Note: If you use the form validation class, it gives you the option of XSS filtering as well.</p>
|
111
|
+
|
112
|
+
<p>An optional second parameter, <dfn>is_image</dfn>, allows this function to be used to test images for potential XSS attacks, useful for file upload security. When this second parameter is set to <dfn>TRUE</dfn>, instead of returning an altered string, the function returns TRUE if the image is safe, and FALSE if it contained potentially malicious information that a browser may attempt to execute.</p>
|
113
|
+
|
114
|
+
<code>if ($this->input->xss_clean($file, TRUE) === FALSE)<br />
|
115
|
+
{<br />
|
116
|
+
// file failed the XSS test<br />
|
117
|
+
}</code>
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Using POST, COOKIE, or SERVER Data</h2>
|
121
|
+
|
122
|
+
<p>CodeIgniter comes with three helper functions that let you fetch POST, COOKIE or SERVER items. The main advantage of using the provided
|
123
|
+
functions rather than fetching an item directly ($_POST['something']) is that the functions will check to see if the item is set and
|
124
|
+
return false (boolean) if not. This lets you conveniently use data without having to test whether an item exists first.
|
125
|
+
In other words, normally you might do something like this:</p>
|
126
|
+
|
127
|
+
<code>
|
128
|
+
if ( ! isset($_POST['something']))<br />
|
129
|
+
{<br />
|
130
|
+
$something = FALSE;<br />
|
131
|
+
}<br />
|
132
|
+
else<br />
|
133
|
+
{<br />
|
134
|
+
$something = $_POST['something'];<br />
|
135
|
+
}</code>
|
136
|
+
|
137
|
+
<p>With CodeIgniter's built in functions you can simply do this:</p>
|
138
|
+
|
139
|
+
<code>$something = $this->input->post('something');</code>
|
140
|
+
|
141
|
+
<p>The three functions are:</p>
|
142
|
+
|
143
|
+
<ul>
|
144
|
+
<li>$this->input->post()</li>
|
145
|
+
<li>$this->input->cookie()</li>
|
146
|
+
<li>$this->input->server()</li>
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
<h2>$this->input->post()</h2>
|
150
|
+
|
151
|
+
<p>The first parameter will contain the name of the POST item you are looking for:</p>
|
152
|
+
|
153
|
+
<code>$this->input->post('some_data');</code>
|
154
|
+
|
155
|
+
<p>The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.</p>
|
156
|
+
|
157
|
+
<p>The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;</p>
|
158
|
+
|
159
|
+
<code>$this->input->post('some_data', TRUE);</code>
|
160
|
+
|
161
|
+
<h2>$this->input->get()</h2>
|
162
|
+
|
163
|
+
<p>This function is identical to the post function, only it fetches get data:</p>
|
164
|
+
|
165
|
+
<code>$this->input->get('some_data', TRUE);</code>
|
166
|
+
|
167
|
+
<h2>$this->input->get_post()</h2>
|
168
|
+
|
169
|
+
<p>This function will search through both the post and get streams for data, looking first in post, and then in get:</p>
|
170
|
+
|
171
|
+
<code>$this->input->get_post('some_data', TRUE);</code>
|
172
|
+
|
173
|
+
<h2>$this->input->cookie()</h2>
|
174
|
+
|
175
|
+
<p>This function is identical to the post function, only it fetches cookie data:</p>
|
176
|
+
|
177
|
+
<code>$this->input->cookie('some_data', TRUE);</code>
|
178
|
+
|
179
|
+
<h2>$this->input->server()</h2>
|
180
|
+
|
181
|
+
<p>This function is identical to the above functions, only it fetches server data:</p>
|
182
|
+
|
183
|
+
<code>$this->input->server('some_data');</code>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<h2>$this->input->ip_address()</h2>
|
189
|
+
<p>Returns the IP address for the current user. If the IP address is not valid, the function will return an IP of: 0.0.0.0</p>
|
190
|
+
<code>echo $this->input->ip_address();</code>
|
191
|
+
|
192
|
+
|
193
|
+
<h2>$this->input->valid_ip(<var>$ip</var>)</h2>
|
194
|
+
|
195
|
+
<p>Takes an IP address as input and returns TRUE or FALSE (boolean) if it is valid or not. Note: The $this->input->ip_address() function above
|
196
|
+
validates the IP automatically.</p>
|
197
|
+
|
198
|
+
<code>if ( ! $this->input->valid_ip($ip))<br />
|
199
|
+
{<br />
|
200
|
+
echo 'Not Valid';<br />
|
201
|
+
}<br />
|
202
|
+
else<br />
|
203
|
+
{<br />
|
204
|
+
echo 'Valid';<br />
|
205
|
+
}</code>
|
206
|
+
|
207
|
+
|
208
|
+
<h2>$this->input->user_agent()</h2>
|
209
|
+
<p>Returns the user agent (web browser) being used by the current user. Returns FALSE if it's not available.</p>
|
210
|
+
<code>echo $this->input->user_agent();</code>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
</div>
|
216
|
+
<!-- END CONTENT -->
|
217
|
+
|
218
|
+
|
219
|
+
<div id="footer">
|
220
|
+
<p>
|
221
|
+
Previous Topic: <a href="image_lib.html">Image Manipulation Class</a>
|
222
|
+
·
|
223
|
+
<a href="#top">Top of Page</a> ·
|
224
|
+
<a href="../index.html">User Guide Home</a> ·
|
225
|
+
Next Topic: <a href="loader.html">Loader Class</a>
|
226
|
+
</p>
|
227
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
228
|
+
</div>
|
229
|
+
|
230
|
+
</body>
|
231
|
+
</html>
|
@@ -0,0 +1,137 @@
|
|
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>Language Class : 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
|
+
Language Class
|
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
|
+
|
59
|
+
<h1>Language Class</h1>
|
60
|
+
|
61
|
+
<p>The Language Class provides functions to retrieve language files and lines of text for purposes of internationalization.</p>
|
62
|
+
|
63
|
+
<p>In your CodeIgniter system folder you'll find one called <dfn>language</dfn> containing sets of language files. You can create
|
64
|
+
your own language files as needed in order to display error and other messages in other languages.</p>
|
65
|
+
|
66
|
+
<p>Language files are typically stored in your <dfn>system/language</dfn> directory. Alternately you can create a folder called <kbd>language</kbd> inside
|
67
|
+
your <kbd>application</kbd> folder and store them there. CodeIgniter will look first in your <dfn>system/application/language</dfn>
|
68
|
+
directory. If the directory does not exist or the specified language is not located there CI will instead look in your global
|
69
|
+
<dfn>system/language</dfn> folder.</p>
|
70
|
+
|
71
|
+
<p class="important"><strong>Note:</strong> Each language should be stored in its own folder. For example, the English files are located at:
|
72
|
+
<dfn>system/language/english</dfn></p>
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<h2>Creating Language Files</h2>
|
77
|
+
|
78
|
+
<p>Language files must be named with <kbd>_lang.php</kbd> as the file extension. For example, let's say you want to create a file
|
79
|
+
containing error messages. You might name it: <kbd>error_lang.php</kbd></p>
|
80
|
+
|
81
|
+
<p>Within the file you will assign each line of text to an array called <var>$lang</var> with this prototype:</p>
|
82
|
+
|
83
|
+
<code>$lang['language_key'] = "The actual message to be shown";</code>
|
84
|
+
|
85
|
+
<p><strong>Note:</strong> It's a good practice to use a common prefix for all messages in a given file to avoid collisions with
|
86
|
+
similarly named items in other files. For example, if you are creating error messages you might prefix them with <var>error_</var></p>
|
87
|
+
|
88
|
+
<code>$lang['<var>error</var>_email_missing'] = "You must submit an email address";<br />
|
89
|
+
$lang['<var>error</var>_url_missing'] = "You must submit a URL";<br />
|
90
|
+
$lang['<var>error</var>_username_missing'] = "You must submit a username";</code>
|
91
|
+
|
92
|
+
|
93
|
+
<h2>Loading A Language File</h2>
|
94
|
+
|
95
|
+
<p>In order to fetch a line from a particular file you must load the file first. Loading a language file is done with the following code:</p>
|
96
|
+
|
97
|
+
<code>$this->lang->load('<samp>filename</samp>', '<dfn>language</dfn>');</code>
|
98
|
+
|
99
|
+
<p>Where <samp>filename</samp> is the name of the file you wish to load (without the file extension), and <dfn>language</dfn>
|
100
|
+
is the language set containing it (ie, english). If the second parameter is missing, the default language set in your
|
101
|
+
<kbd>application/config/config.php</kbd> file will be used.</p>
|
102
|
+
|
103
|
+
|
104
|
+
<h2>Fetching a Line of Text</h2>
|
105
|
+
|
106
|
+
<p>Once your desired language file is loaded you can access any line of text using this function:</p>
|
107
|
+
|
108
|
+
<code>$this->lang->line('<samp>language_key</samp>');</code>
|
109
|
+
|
110
|
+
<p>Where <samp>language_key</samp> is the array key corresponding to the line you wish to show.</p>
|
111
|
+
|
112
|
+
<p>Note: This function simply returns the line. It does not echo it for you.</p>
|
113
|
+
|
114
|
+
<h3>Using language lines as form labels</h3>
|
115
|
+
|
116
|
+
<p class="important">This feature has been deprecated from the language library and moved to the <kbd>lang()</kbd> function of the <a href="../helpers/language_helper.html">Language helper</a>.</p>
|
117
|
+
|
118
|
+
<h2>Auto-loading Languages</h2>
|
119
|
+
<p>If you find that you need a particular language globally throughout your application, you can tell CodeIgniter to <a href="../general/autoloader.html">auto-load</a> it during system initialization. This is done by opening the application/config/autoload.php file and adding the language(s) to the autoload array.</p>
|
120
|
+
<p> </p>
|
121
|
+
</div>
|
122
|
+
<!-- END CONTENT -->
|
123
|
+
|
124
|
+
|
125
|
+
<div id="footer">
|
126
|
+
<p>
|
127
|
+
Previous Topic: <a href="loader.html">Loader Class</a>
|
128
|
+
·
|
129
|
+
<a href="#top">Top of Page</a> ·
|
130
|
+
<a href="../index.html">User Guide Home</a> ·
|
131
|
+
Next Topic: <a href="output.html">Output Class</a>
|
132
|
+
</p>
|
133
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
</body>
|
137
|
+
</html>
|
@@ -0,0 +1,214 @@
|
|
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>Loader Class : 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
|
+
Loader Class
|
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
|
+
|
59
|
+
<h1>Loader Class</h1>
|
60
|
+
|
61
|
+
<p>Loader, as the name suggests, is used to load elements. These elements can be libraries (classes) <a href="../general/views.html">View files</a>,
|
62
|
+
<a href="../general/helpers.html">Helpers</a>, <a href="../general/plugins.html">Plugins</a>, or your own files.</p>
|
63
|
+
|
64
|
+
<p class="important"><strong>Note:</strong> This class is initialized automatically by the system so there is no need to do it manually.</p>
|
65
|
+
|
66
|
+
<p>The following functions are available in this class:</p>
|
67
|
+
|
68
|
+
|
69
|
+
<h2>$this->load->library('<var>class_name</var>', <samp>$config</samp>, <kbd>'object name'</kbd>)</h2>
|
70
|
+
|
71
|
+
|
72
|
+
<p>This function is used to load core classes. Where <var>class_name</var> is the name of the class you want to load.
|
73
|
+
Note: We use the terms "class" and "library" interchangeably.</p>
|
74
|
+
|
75
|
+
<p>For example, if you would like to send email with CodeIgniter, the first step is to load the email class within your controller:</p>
|
76
|
+
|
77
|
+
<code>$this->load->library('email');</code>
|
78
|
+
|
79
|
+
<p>Once loaded, the library will be ready for use, using <kbd>$this->email-></kbd><samp><em>some_function</em>()</samp>.
|
80
|
+
|
81
|
+
<p>Library files can be stored in subdirectories within the main "libraries" folder, or within your personal <dfn>application/libraries</dfn> folder.
|
82
|
+
To load a file located in a subdirectory, simply include the path, relative to the "libraries" folder.
|
83
|
+
For example, if you have file located at:</p>
|
84
|
+
|
85
|
+
<code>libraries/flavors/chocolate.php</code>
|
86
|
+
|
87
|
+
<p>You will load it using:</p>
|
88
|
+
|
89
|
+
<code>$this->load->library('flavors/chocolate');</code>
|
90
|
+
|
91
|
+
<p>You may nest the file in as many subdirectories as you want.</p>
|
92
|
+
|
93
|
+
<h3>Setting options</h3>
|
94
|
+
|
95
|
+
<p>The second (optional) parameter allows you to optionally pass configuration setting. You will typically pass these as an array:</p>
|
96
|
+
|
97
|
+
<code>
|
98
|
+
$config = array (<br />
|
99
|
+
'mailtype' => 'html',<br />
|
100
|
+
'charset' => 'utf-8,<br />
|
101
|
+
'priority' => '1'<br />
|
102
|
+
);<br />
|
103
|
+
<br />
|
104
|
+
$this->load->library('email', $config);</code>
|
105
|
+
|
106
|
+
<p>Config options can usually also be set via a config file. Each library is explained in detail in its own page, so please read the information regarding each one you would like to use.</p>
|
107
|
+
|
108
|
+
<h3>Assigning a Library to a different object name</h3>
|
109
|
+
|
110
|
+
<p>If the third (optional) parameter is blank, the library will usually be assigned to an object with the same name as the library. For example, if the library is named <dfn>Session</dfn>, it
|
111
|
+
will be assigned to a variable named <dfn>$this->session</dfn>.</p>
|
112
|
+
|
113
|
+
<p>If you prefer to set your own class names you can pass its value to the third parameter:</p>
|
114
|
+
|
115
|
+
<code>$this->load->library('session', '', 'my_session');<br /><br />
|
116
|
+
|
117
|
+
// Session class is now accessed using:<br /><br />
|
118
|
+
|
119
|
+
$this->my_session
|
120
|
+
|
121
|
+
</code>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<h2>$this->load->view('<var>file_name</var>', <samp>$data</samp>, <kbd>true/false</kbd>)</h2>
|
126
|
+
|
127
|
+
<p>This function is used to load your View files. If you haven't read the <a href="../general/views.html">Views</a> section of the
|
128
|
+
user guide it is recommended that you do since it shows you how this function is typically used.</p>
|
129
|
+
|
130
|
+
<p>The first parameter is required. It is the name of the view file you would like to load. Note: The .php file extension does not need to be specified unless you use something other than <kbd>.php</kbd>.</p>
|
131
|
+
|
132
|
+
<p>The second <strong>optional</strong> parameter can take
|
133
|
+
an associative array or an object as input, which it runs through the PHP <a href="http://www.php.net/extract">extract</a> function to
|
134
|
+
convert to variables that can be used in your view files. Again, read the <a href="../general/views.html">Views</a> page to learn
|
135
|
+
how this might be useful.</p>
|
136
|
+
|
137
|
+
<p>The third <strong>optional</strong> parameter lets you change the behavior of the function so that it returns data as a string
|
138
|
+
rather than sending it to your browser. This can be useful if you want to process the data in some way. If you
|
139
|
+
set the parameter to <kbd>true</kbd> (boolean) it will return data. The default behavior is <kbd>false</kbd>, which sends it
|
140
|
+
to your browser. Remember to assign it to a variable if you want the data returned:</p>
|
141
|
+
|
142
|
+
<code>$string = $this->load->view('<var>myfile</var>', '', <kbd>true</kbd>);</code>
|
143
|
+
|
144
|
+
|
145
|
+
<h2>$this->load->model('<var>Model_name</var>');</h2>
|
146
|
+
<p><code>$this->load->model('<var>Model_name</var>');</code></p>
|
147
|
+
<p>If your model is located in a sub-folder, include the relative path from your models folder. For example, if you have a model located at application/models/blog/queries.php you'll load it using:</p>
|
148
|
+
<p><code>$this->load->model('<var>blog/queries</var>');</code></p>
|
149
|
+
<p>If you would like your model assigned to a different object name you can specify it via the second parameter of the loading
|
150
|
+
function:</p>
|
151
|
+
<code> $this->load->model('<var>Model_name</var>', '<kbd>fubar</kbd>');<br />
|
152
|
+
<br />
|
153
|
+
$this-><kbd>fubar</kbd>->function();</code>
|
154
|
+
<h2>$this->load->database('<var>options</var>', <kbd>true/false</kbd>)</h2>
|
155
|
+
<p>This function lets you load the database class. The two parameters are <strong>optional</strong>. Please see the
|
156
|
+
<a href="../database/index.html">database</a> section for more info.</p>
|
157
|
+
|
158
|
+
|
159
|
+
<h2>$this->load->scaffolding('<var>table_name</var>')</h2>
|
160
|
+
|
161
|
+
<p>This function lets you enable scaffolding. Please see the
|
162
|
+
<a href="../general/scaffolding.html">scaffolding</a> section for more info.</p>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<h2>$this->load->vars(<samp>$array</samp>)</h2>
|
167
|
+
|
168
|
+
<p>This function takes an associative array as input and generates variables using the PHP <a href="http://www.php.net/extract">extract</a> function.
|
169
|
+
This function produces the same result as using the second parameter of the <dfn>$this->load->view()</dfn> function above. The reason you might
|
170
|
+
want to use this function independently is if you would like to set some global variables in the constructor of your controller
|
171
|
+
and have them become available in any view file loaded from any function. You can have multiple calls to this function. The data get cached
|
172
|
+
and merged into one array for conversion to variables.
|
173
|
+
</p>
|
174
|
+
|
175
|
+
|
176
|
+
<h2>$this->load->helper('<var>file_name</var>')</h2>
|
177
|
+
<p>This function loads helper files, where <var>file_name</var> is the name of the file, without the <kbd>_helper.php</kbd> extension.</p>
|
178
|
+
|
179
|
+
|
180
|
+
<h2>$this->load->plugin('<var>file_name</var>')</h2>
|
181
|
+
<p>This function loads plugins files, where <var>file_name</var> is the name of the file, without the <kbd>_plugin.php</kbd> extension.</p>
|
182
|
+
|
183
|
+
<h2>$this->load->file('<var>filepath/filename</var>', <kbd>true/false</kbd>)</h2>
|
184
|
+
<p>This is a generic file loading function. Supply the filepath and name in the first parameter and it will open and read the file.
|
185
|
+
By default the data is sent to your browser, just like a View file, but if you set the second parameter to <kbd>true</kbd> (boolean)
|
186
|
+
it will instead return the data as a string.</p>
|
187
|
+
|
188
|
+
|
189
|
+
<h2>$this->load->lang('<var>file_name</var>')</h2>
|
190
|
+
<p>This function is an alias of the <a href="language.html">language loading function</a>: $this->lang->load()</p>
|
191
|
+
|
192
|
+
<h2>$this->load->config('<var>file_name</var>')</h2>
|
193
|
+
<p>This function is an alias of the <a href="config.html">config file loading function</a>: $this->config->load()</p>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</div>
|
199
|
+
<!-- END CONTENT -->
|
200
|
+
|
201
|
+
|
202
|
+
<div id="footer">
|
203
|
+
<p>
|
204
|
+
Previous Topic: <a href="input.html">Input Class</a>
|
205
|
+
·
|
206
|
+
<a href="#top">Top of Page</a> ·
|
207
|
+
<a href="../index.html">User Guide Home</a> ·
|
208
|
+
Next Topic: <a href="language.html">Language Class</a>
|
209
|
+
</p>
|
210
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
</body>
|
214
|
+
</html>
|