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,151 @@
|
|
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>CodeIgniter URLs : 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
|
+
URLS
|
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>CodeIgniter URLs</h1>
|
60
|
+
|
61
|
+
<p>By default, URLs in CodeIgniter are designed to be search-engine and human friendly. Rather than using the standard "query string"
|
62
|
+
approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a <strong>segment-based</strong> approach:</p>
|
63
|
+
|
64
|
+
<code>example.com/<var>news</var>/<dfn>article</dfn>/<samp>my_article</samp></code>
|
65
|
+
|
66
|
+
<p class="important"><strong>Note:</strong> Query string URLs can be optionally enabled, as described below.</p>
|
67
|
+
|
68
|
+
<h2>URI Segments</h2>
|
69
|
+
|
70
|
+
<p>The segments in the URL, in following with the Model-View-Controller approach, usually represent:</p>
|
71
|
+
|
72
|
+
<code>example.com/<var>class</var>/<dfn>function</dfn>/<samp>ID</samp></code>
|
73
|
+
|
74
|
+
<ol>
|
75
|
+
<li>The first segment represents the controller <strong>class</strong> that should be invoked.</li>
|
76
|
+
<li>The second segment represents the class <strong>function</strong>, or method, that should be called.</li>
|
77
|
+
<li>The third, and any additional segments, represent the ID and any variables that will be passed to the controller.</li>
|
78
|
+
</ol>
|
79
|
+
|
80
|
+
<p>The <a href="../libraries/uri.html">URI Class</a> and the <a href="../helpers/url_helper.html">URL Helper</a>
|
81
|
+
contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the
|
82
|
+
<a href="routing.html">URI Routing</a> feature for more flexibility.</p>
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
<h2>Removing the index.php file</h2>
|
87
|
+
|
88
|
+
<p>By default, the <strong>index.php</strong> file will be included in your URLs:</p>
|
89
|
+
|
90
|
+
<code>example.com/<var>index.php</var>/news/article/my_article</code>
|
91
|
+
|
92
|
+
<p>You can easily remove this file by using a .htaccess file with some simple rules. Here is an example
|
93
|
+
of such a file, using the "negative" method in which everything is redirected except the specified items:</p>
|
94
|
+
|
95
|
+
<code>RewriteEngine on<br />
|
96
|
+
RewriteCond $1 !^(index\.php|images|robots\.txt)<br />
|
97
|
+
RewriteRule ^(.*)$ /index.php/$1 [L]</code>
|
98
|
+
|
99
|
+
<p>In the above example, any HTTP request other than those for index.php, images, and robots.txt is treated as
|
100
|
+
a request for your index.php file.</p>
|
101
|
+
|
102
|
+
|
103
|
+
<h2>Adding a URL Suffix</h2>
|
104
|
+
|
105
|
+
<p>In your <dfn>config/config.php</dfn> file you can specify a suffix that will be added to all URLs generated
|
106
|
+
by CodeIgniter. For example, if a URL is this:</p>
|
107
|
+
|
108
|
+
<code>example.com/index.php/products/view/shoes</code>
|
109
|
+
|
110
|
+
<p>You can optionally add a suffix, like <kbd>.html</kbd>, making the page appear to be of a certain type:</p>
|
111
|
+
|
112
|
+
<code>example.com/index.php/products/view/shoes.html</code>
|
113
|
+
|
114
|
+
|
115
|
+
<h2>Enabling Query Strings</h2>
|
116
|
+
|
117
|
+
<p>In some cases you might prefer to use query strings URLs:</p>
|
118
|
+
|
119
|
+
<code>index.php?c=products&m=view&id=345</code>
|
120
|
+
|
121
|
+
<p>CodeIgniter optionally supports this capability, which can be enabled in your <dfn>application/config.php</dfn> file. If you
|
122
|
+
open your config file you'll see these items:</p>
|
123
|
+
|
124
|
+
<code>$config['enable_query_strings'] = FALSE;<br />
|
125
|
+
$config['controller_trigger'] = 'c';<br />
|
126
|
+
$config['function_trigger'] = 'm';</code>
|
127
|
+
|
128
|
+
<p>If you change "enable_query_strings" to TRUE this feature will become active. Your controllers and functions will then
|
129
|
+
be accessible using the "trigger" words you've set to invoke your controllers and methods:</p>
|
130
|
+
|
131
|
+
<code>index.php?c=controller&m=method</code>
|
132
|
+
|
133
|
+
<p class="important"><strong>Please note:</strong> If you are using query strings you will have to build your own URLs, rather than utilizing
|
134
|
+
the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with
|
135
|
+
segment based URLs.</p>
|
136
|
+
|
137
|
+
|
138
|
+
</div>
|
139
|
+
<!-- END CONTENT -->
|
140
|
+
|
141
|
+
|
142
|
+
<div id="footer">
|
143
|
+
<p>
|
144
|
+
<a href="#top">Top of Page</a> ·
|
145
|
+
<a href="../index.html">User Guide Home</a> ·
|
146
|
+
Next Topic: <a href="controllers.html">Controllers</a></p>
|
147
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
</body>
|
151
|
+
</html>
|
@@ -0,0 +1,274 @@
|
|
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>Views : 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
|
+
Views
|
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>Views</h1>
|
59
|
+
|
60
|
+
<p>A <dfn>view</dfn> is simply a web page, or a page fragment, like a header, footer, sidebar, etc.
|
61
|
+
In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type
|
62
|
+
of hierarchy.</p>
|
63
|
+
|
64
|
+
<p>Views are never called directly, they must be loaded by a <a href="controllers.html">controller</a>. Remember that in an MVC framework, the Controller acts as the
|
65
|
+
traffic cop, so it is responsible for fetching a particular view. If you have not read the <a href="controllers.html">Controllers</a> page
|
66
|
+
you should do so before continuing.</p>
|
67
|
+
|
68
|
+
<p>Using the example controller you created in the <a href="controllers.html">controller</a> page, let's add a view to it.</p>
|
69
|
+
|
70
|
+
<h2>Creating a View</h2>
|
71
|
+
|
72
|
+
<p>Using your text editor, create a file called <dfn>blogview.php</dfn>, and put this in it:</p>
|
73
|
+
|
74
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="10">
|
75
|
+
<html>
|
76
|
+
<head>
|
77
|
+
<title>My Blog</title>
|
78
|
+
</head>
|
79
|
+
<body>
|
80
|
+
<h1>Welcome to my Blog!</h1>
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
</textarea>
|
84
|
+
|
85
|
+
<p>Then save the file in your <dfn>application/views/</dfn> folder.</p>
|
86
|
+
|
87
|
+
<h2>Loading a View</h2>
|
88
|
+
|
89
|
+
<p>To load a particular view file you will use the following function:</p>
|
90
|
+
|
91
|
+
<code>$this->load->view('<var>name</var>');</code>
|
92
|
+
|
93
|
+
<p>Where <var>name</var> is the name of your view file. Note: The .php file extension does not need to be specified unless you use something other than <kbd>.php</kbd>.</p>
|
94
|
+
|
95
|
+
|
96
|
+
<p>Now, open the controller file you made earlier called <dfn>blog.php</dfn>, and replace the echo statement with the view loading function:</p>
|
97
|
+
|
98
|
+
|
99
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="10">
|
100
|
+
<?php
|
101
|
+
class Blog extends Controller {
|
102
|
+
|
103
|
+
function index()
|
104
|
+
{
|
105
|
+
$this->load->view('blogview');
|
106
|
+
}
|
107
|
+
}
|
108
|
+
?>
|
109
|
+
</textarea>
|
110
|
+
|
111
|
+
|
112
|
+
<p>If you visit the your site using the URL you did earlier you should see your new view. The URL was similar to this:</p>
|
113
|
+
|
114
|
+
<code>example.com/index.php/<var>blog</var>/</code>
|
115
|
+
|
116
|
+
<h2>Loading multiple views</h2>
|
117
|
+
<p>CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more then one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:</p>
|
118
|
+
<p><code><?php<br />
|
119
|
+
<br />
|
120
|
+
class Page extends Controller {<br /><br />
|
121
|
+
|
122
|
+
function index()<br />
|
123
|
+
{<br />
|
124
|
+
$data['page_title'] = 'Your title';<br />
|
125
|
+
$this->load->view('header');<br />
|
126
|
+
$this->load->view('menu');<br />
|
127
|
+
$this->load->view('content', $data);<br />
|
128
|
+
$this->load->view('footer');<br />
|
129
|
+
}<br />
|
130
|
+
<br />
|
131
|
+
}<br />
|
132
|
+
?></code></p>
|
133
|
+
<p>In the example above, we are using "dynamically added data", which you will see below.</p>
|
134
|
+
<h2>Storing Views within Sub-folders</h2>
|
135
|
+
<p>Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need
|
136
|
+
to include the folder name loading the view. Example:</p>
|
137
|
+
|
138
|
+
<code>$this->load->view('<kbd>folder_name</kbd>/<var>file_name</var>');</code>
|
139
|
+
|
140
|
+
|
141
|
+
<h2>Adding Dynamic Data to the View</h2>
|
142
|
+
|
143
|
+
<p>Data is passed from the controller to the view by way of an <strong>array</strong> or an <strong>object</strong> in the second
|
144
|
+
parameter of the view loading function. Here is an example using an array:</p>
|
145
|
+
|
146
|
+
<code>$data = array(<br />
|
147
|
+
'title' => 'My Title',<br />
|
148
|
+
'heading' => 'My Heading',<br />
|
149
|
+
'message' => 'My Message'<br />
|
150
|
+
);<br />
|
151
|
+
<br />
|
152
|
+
$this->load->view('blogview', <var>$data</var>);</code>
|
153
|
+
|
154
|
+
<p>And here's an example using an object:</p>
|
155
|
+
|
156
|
+
<code>$data = new Someclass();<br />
|
157
|
+
$this->load->view('blogview', <var>$data</var>);</code>
|
158
|
+
|
159
|
+
<p>Note: If you use an object, the class variables will be turned into array elements.</p>
|
160
|
+
|
161
|
+
|
162
|
+
<p>Let's try it with your controller file. Open it add this code:</p>
|
163
|
+
|
164
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="14">
|
165
|
+
<?php
|
166
|
+
class Blog extends Controller {
|
167
|
+
|
168
|
+
function index()
|
169
|
+
{
|
170
|
+
$data['title'] = "My Real Title";
|
171
|
+
$data['heading'] = "My Real Heading";
|
172
|
+
|
173
|
+
$this->load->view('blogview', $data);
|
174
|
+
}
|
175
|
+
}
|
176
|
+
?>
|
177
|
+
</textarea>
|
178
|
+
|
179
|
+
|
180
|
+
<p>Now open your view file and change the text to variables that correspond to the array keys in your data:</p>
|
181
|
+
|
182
|
+
|
183
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="10">
|
184
|
+
<html>
|
185
|
+
<head>
|
186
|
+
<title><?php echo $title;?></title>
|
187
|
+
</head>
|
188
|
+
<body>
|
189
|
+
<h1><?php echo $heading;?></h1>
|
190
|
+
</body>
|
191
|
+
</html>
|
192
|
+
</textarea>
|
193
|
+
|
194
|
+
<p>Then load the page at the URL you've been using and you should see the variables replaced.</p>
|
195
|
+
|
196
|
+
<h2>Creating Loops</h2>
|
197
|
+
|
198
|
+
<p>The data array you pass to your view files is not limited to simple variables. You can
|
199
|
+
pass multi dimensional arrays, which can be looped to generate multiple rows. For example, if you
|
200
|
+
pull data from your database it will typically be in the form of a multi-dimensional array.</p>
|
201
|
+
|
202
|
+
<p>Here's a simple example. Add this to your controller:</p>
|
203
|
+
|
204
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="17">
|
205
|
+
<?php
|
206
|
+
class Blog extends Controller {
|
207
|
+
|
208
|
+
function index()
|
209
|
+
{
|
210
|
+
$data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');
|
211
|
+
|
212
|
+
$data['title'] = "My Real Title";
|
213
|
+
$data['heading'] = "My Real Heading";
|
214
|
+
|
215
|
+
$this->load->view('blogview', $data);
|
216
|
+
}
|
217
|
+
}
|
218
|
+
?>
|
219
|
+
</textarea>
|
220
|
+
|
221
|
+
|
222
|
+
<p>Now open your view file and create a loop:</p>
|
223
|
+
|
224
|
+
|
225
|
+
<textarea class="textarea" style="width:100%" cols="50" rows="24">
|
226
|
+
<html>
|
227
|
+
<head>
|
228
|
+
<title><?php echo $title;?></title>
|
229
|
+
</head>
|
230
|
+
<body>
|
231
|
+
<h1><?php echo $heading;?></h1>
|
232
|
+
|
233
|
+
<h3>My Todo List</h3>
|
234
|
+
|
235
|
+
<ul>
|
236
|
+
<?php foreach($todo_list as $item):?>
|
237
|
+
|
238
|
+
<li><?php echo $item;?></li>
|
239
|
+
|
240
|
+
<?php endforeach;?>
|
241
|
+
</ul>
|
242
|
+
|
243
|
+
</body>
|
244
|
+
</html>
|
245
|
+
</textarea>
|
246
|
+
<p><strong>Note:</strong> You'll notice that in the example above we are using PHP's alternative syntax. If you
|
247
|
+
are not familiar with it you can read about it <a href="alternative_php.html">here</a>.</p>
|
248
|
+
|
249
|
+
<h2>Returning views as data</h2>
|
250
|
+
|
251
|
+
<p>There is a third <strong>optional</strong> parameter lets you change the behavior of the function so that it returns data as a string
|
252
|
+
rather than sending it to your browser. This can be useful if you want to process the data in some way. If you
|
253
|
+
set the parameter to <kbd>true</kbd> (boolean) it will return data. The default behavior is <kbd>false</kbd>, which sends it
|
254
|
+
to your browser. Remember to assign it to a variable if you want the data returned:</p>
|
255
|
+
|
256
|
+
<code>$string = $this->load->view('<var>myfile</var>', '', <kbd>true</kbd>);</code>
|
257
|
+
|
258
|
+
</div>
|
259
|
+
<!-- END CONTENT -->
|
260
|
+
|
261
|
+
|
262
|
+
<div id="footer">
|
263
|
+
<p>
|
264
|
+
Previous Topic: <a href="reserved_names.html">Reserved Names</a>
|
265
|
+
·
|
266
|
+
<a href="#top">Top of Page</a> ·
|
267
|
+
<a href="../index.html">User Guide Home</a> ·
|
268
|
+
Next Topic: <a href="models.html">Models</a>
|
269
|
+
</p>
|
270
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
</body>
|
274
|
+
</html>
|
@@ -0,0 +1,119 @@
|
|
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>Array Helper : 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
|
+
Array Helper
|
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>Array Helper</h1>
|
60
|
+
|
61
|
+
<p>The Array Helper file contains functions that assist in working with arrays.</p>
|
62
|
+
|
63
|
+
|
64
|
+
<h2>Loading this Helper</h2>
|
65
|
+
|
66
|
+
<p>This helper is loaded using the following code:</p>
|
67
|
+
<code>$this->load->helper('array');</code>
|
68
|
+
|
69
|
+
<p>The following functions are available:</p>
|
70
|
+
|
71
|
+
<h2>element()</h2>
|
72
|
+
|
73
|
+
<p>Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If
|
74
|
+
a value exists it is returned. If a value does not exist it returns FALSE, or whatever you've specified as the default value via the third parameter. Example:</p>
|
75
|
+
|
76
|
+
<code>
|
77
|
+
$array = array('color' => 'red', 'shape' => 'round', 'size' => '');<br />
|
78
|
+
<br />
|
79
|
+
// returns "red"<br />
|
80
|
+
echo element('color', $array);<br />
|
81
|
+
<br />
|
82
|
+
// returns NULL<br />
|
83
|
+
echo element('size', $array, NULL);
|
84
|
+
</code>
|
85
|
+
|
86
|
+
|
87
|
+
<h2>random_element()</h2>
|
88
|
+
|
89
|
+
<p>Takes an array as input and returns a random element from it. Usage example:</p>
|
90
|
+
|
91
|
+
<code>$quotes = array(<br />
|
92
|
+
"I find that the harder I work, the more luck I seem to have. - Thomas Jefferson",<br />
|
93
|
+
"Don't stay in bed, unless you can make money in bed. - George Burns",<br />
|
94
|
+
"We didn't lose the game; we just ran out of time. - Vince Lombardi",<br />
|
95
|
+
"If everything seems under control, you're not going fast enough. - Mario Andretti",<br />
|
96
|
+
"Reality is merely an illusion, albeit a very persistent one. - Albert Einstein",<br />
|
97
|
+
"Chance favors the prepared mind - Louis Pasteur"<br />
|
98
|
+
);<br />
|
99
|
+
<br />
|
100
|
+
echo random_element($quotes);</code>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
<!-- END CONTENT -->
|
107
|
+
|
108
|
+
|
109
|
+
<div id="footer">
|
110
|
+
<p>
|
111
|
+
Previous Topic: <a href="../libraries/zip.html">Zip Encoding Class</a> ·
|
112
|
+
<a href="#top">Top of Page</a> ·
|
113
|
+
<a href="../index.html">User Guide Home</a> ·
|
114
|
+
Next Topic: <a href="compatibility_helper.html">Compatibility Helper</a></p>
|
115
|
+
<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
</body>
|
119
|
+
</html>
|