├── .gitignore ├── .htaccess ├── README.md ├── application ├── .htaccess ├── cache │ ├── .htaccess │ └── index.html ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── index.html │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ └── index.html ├── core │ ├── MY_Controller.php │ ├── MY_Loader.php │ ├── MY_Router.php │ └── index.html ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html ├── helpers │ └── index.html ├── hooks │ └── index.html ├── index.html ├── language │ └── english │ │ └── index.html ├── libraries │ ├── index.html │ └── rb │ │ ├── drivers │ │ ├── BeanFormatter.php │ │ ├── Field.php │ │ ├── Model.php │ │ ├── ModelFormatter.php │ │ └── index.html │ │ ├── index.html │ │ └── rb.php ├── logs │ └── index.html ├── models │ └── index.html ├── modules │ ├── index.html │ ├── test │ │ └── controllers │ │ │ └── test.php │ └── welcome │ │ ├── controllers │ │ └── welcome.php │ │ └── views │ │ └── welcome_message.php ├── third_party │ ├── MX │ │ ├── Base.php │ │ ├── Ci.php │ │ ├── Config.php │ │ ├── Controller.php │ │ ├── Lang.php │ │ ├── Loader.php │ │ ├── Modules.php │ │ └── Router.php │ ├── RedBean │ │ ├── license.txt │ │ └── rb.php │ └── index.html └── views │ └── index.html ├── index.php ├── license.txt ├── system ├── .htaccess ├── core │ ├── Benchmark.php │ ├── CodeIgniter.php │ ├── Common.php │ ├── Config.php │ ├── Controller.php │ ├── Exceptions.php │ ├── Hooks.php │ ├── Input.php │ ├── Lang.php │ ├── Loader.php │ ├── Model.php │ ├── Output.php │ ├── Router.php │ ├── Security.php │ ├── URI.php │ ├── Utf8.php │ └── index.html ├── database │ ├── DB.php │ ├── DB_active_rec.php │ ├── DB_cache.php │ ├── DB_driver.php │ ├── DB_forge.php │ ├── DB_result.php │ ├── DB_utility.php │ ├── drivers │ │ ├── cubrid │ │ │ ├── cubrid_driver.php │ │ │ ├── cubrid_forge.php │ │ │ ├── cubrid_result.php │ │ │ ├── cubrid_utility.php │ │ │ └── index.html │ │ ├── index.html │ │ ├── mssql │ │ │ ├── index.html │ │ │ ├── mssql_driver.php │ │ │ ├── mssql_forge.php │ │ │ ├── mssql_result.php │ │ │ └── mssql_utility.php │ │ ├── mysql │ │ │ ├── index.html │ │ │ ├── mysql_driver.php │ │ │ ├── mysql_forge.php │ │ │ ├── mysql_result.php │ │ │ └── mysql_utility.php │ │ ├── mysqli │ │ │ ├── index.html │ │ │ ├── mysqli_driver.php │ │ │ ├── mysqli_forge.php │ │ │ ├── mysqli_result.php │ │ │ └── mysqli_utility.php │ │ ├── oci8 │ │ │ ├── index.html │ │ │ ├── oci8_driver.php │ │ │ ├── oci8_forge.php │ │ │ ├── oci8_result.php │ │ │ └── oci8_utility.php │ │ ├── odbc │ │ │ ├── index.html │ │ │ ├── odbc_driver.php │ │ │ ├── odbc_forge.php │ │ │ ├── odbc_result.php │ │ │ └── odbc_utility.php │ │ ├── pdo │ │ │ ├── index.html │ │ │ ├── pdo_driver.php │ │ │ ├── pdo_forge.php │ │ │ ├── pdo_result.php │ │ │ └── pdo_utility.php │ │ ├── postgre │ │ │ ├── index.html │ │ │ ├── postgre_driver.php │ │ │ ├── postgre_forge.php │ │ │ ├── postgre_result.php │ │ │ └── postgre_utility.php │ │ ├── sqlite │ │ │ ├── index.html │ │ │ ├── sqlite_driver.php │ │ │ ├── sqlite_forge.php │ │ │ ├── sqlite_result.php │ │ │ └── sqlite_utility.php │ │ └── sqlsrv │ │ │ ├── index.html │ │ │ ├── sqlsrv_driver.php │ │ │ ├── sqlsrv_forge.php │ │ │ ├── sqlsrv_result.php │ │ │ └── sqlsrv_utility.php │ └── index.html ├── fonts │ ├── index.html │ └── texb.ttf ├── helpers │ ├── array_helper.php │ ├── captcha_helper.php │ ├── cookie_helper.php │ ├── date_helper.php │ ├── directory_helper.php │ ├── download_helper.php │ ├── email_helper.php │ ├── file_helper.php │ ├── form_helper.php │ ├── html_helper.php │ ├── index.html │ ├── inflector_helper.php │ ├── language_helper.php │ ├── number_helper.php │ ├── path_helper.php │ ├── security_helper.php │ ├── smiley_helper.php │ ├── string_helper.php │ ├── text_helper.php │ ├── typography_helper.php │ ├── url_helper.php │ └── xml_helper.php ├── index.html ├── language │ ├── english │ │ ├── calendar_lang.php │ │ ├── date_lang.php │ │ ├── db_lang.php │ │ ├── email_lang.php │ │ ├── form_validation_lang.php │ │ ├── ftp_lang.php │ │ ├── imglib_lang.php │ │ ├── index.html │ │ ├── migration_lang.php │ │ ├── number_lang.php │ │ ├── profiler_lang.php │ │ ├── unit_test_lang.php │ │ └── upload_lang.php │ └── index.html └── libraries │ ├── Cache │ ├── Cache.php │ └── drivers │ │ ├── Cache_apc.php │ │ ├── Cache_dummy.php │ │ ├── Cache_file.php │ │ └── Cache_memcached.php │ ├── Calendar.php │ ├── Cart.php │ ├── Driver.php │ ├── Email.php │ ├── Encrypt.php │ ├── Form_validation.php │ ├── Ftp.php │ ├── Image_lib.php │ ├── Javascript.php │ ├── Log.php │ ├── Migration.php │ ├── Pagination.php │ ├── Parser.php │ ├── Profiler.php │ ├── Session.php │ ├── Sha1.php │ ├── Table.php │ ├── Trackback.php │ ├── Typography.php │ ├── Unit_test.php │ ├── Upload.php │ ├── User_agent.php │ ├── Xmlrpc.php │ ├── Xmlrpcs.php │ ├── Zip.php │ ├── index.html │ └── javascript │ └── Jquery.php └── user_guide ├── changelog.html ├── database ├── active_record.html ├── caching.html ├── call_function.html ├── configuration.html ├── connecting.html ├── examples.html ├── fields.html ├── forge.html ├── helpers.html ├── index.html ├── queries.html ├── results.html ├── table_data.html ├── transactions.html └── utilities.html ├── doc_style ├── index.html └── template.html ├── general ├── alternative_php.html ├── ancillary_classes.html ├── autoloader.html ├── caching.html ├── cli.html ├── common_functions.html ├── controllers.html ├── core_classes.html ├── creating_drivers.html ├── creating_libraries.html ├── credits.html ├── drivers.html ├── environments.html ├── errors.html ├── helpers.html ├── hooks.html ├── libraries.html ├── managing_apps.html ├── models.html ├── profiling.html ├── quick_reference.html ├── requirements.html ├── reserved_names.html ├── routing.html ├── security.html ├── styleguide.html ├── urls.html └── views.html ├── helpers ├── array_helper.html ├── captcha_helper.html ├── cookie_helper.html ├── date_helper.html ├── directory_helper.html ├── download_helper.html ├── email_helper.html ├── file_helper.html ├── form_helper.html ├── html_helper.html ├── inflector_helper.html ├── language_helper.html ├── number_helper.html ├── path_helper.html ├── security_helper.html ├── smiley_helper.html ├── string_helper.html ├── text_helper.html ├── typography_helper.html ├── url_helper.html └── xml_helper.html ├── images ├── appflowchart.gif ├── arrow.gif ├── ci_logo.jpg ├── ci_logo_flame.jpg ├── ci_quick_ref.png ├── codeigniter_1.7.1_helper_reference.pdf ├── codeigniter_1.7.1_helper_reference.png ├── codeigniter_1.7.1_library_reference.pdf ├── codeigniter_1.7.1_library_reference.png ├── file.gif ├── folder.gif ├── nav_bg_darker.jpg ├── nav_separator_darker.jpg ├── nav_toggle_darker.jpg ├── reactor-bullet.png ├── smile.gif └── transparent.gif ├── index.html ├── installation ├── downloads.html ├── index.html ├── troubleshooting.html ├── upgrade_120.html ├── upgrade_130.html ├── upgrade_131.html ├── upgrade_132.html ├── upgrade_133.html ├── upgrade_140.html ├── upgrade_141.html ├── upgrade_150.html ├── upgrade_152.html ├── upgrade_153.html ├── upgrade_154.html ├── upgrade_160.html ├── upgrade_161.html ├── upgrade_162.html ├── upgrade_163.html ├── upgrade_170.html ├── upgrade_171.html ├── upgrade_172.html ├── upgrade_200.html ├── upgrade_201.html ├── upgrade_202.html ├── upgrade_203.html ├── upgrade_210.html ├── upgrade_211.html ├── upgrade_212.html ├── upgrade_213.html ├── upgrade_b11.html └── upgrading.html ├── libraries ├── benchmark.html ├── caching.html ├── calendar.html ├── cart.html ├── config.html ├── email.html ├── encryption.html ├── file_uploading.html ├── form_validation.html ├── ftp.html ├── image_lib.html ├── input.html ├── javascript.html ├── language.html ├── loader.html ├── migration.html ├── output.html ├── pagination.html ├── parser.html ├── security.html ├── sessions.html ├── table.html ├── trackback.html ├── typography.html ├── unit_testing.html ├── uri.html ├── user_agent.html ├── xmlrpc.html └── zip.html ├── license.html ├── nav ├── hacks.txt ├── moo.fx.js ├── nav.js ├── prototype.lite.js └── user_guide_menu.js ├── overview ├── appflow.html ├── at_a_glance.html ├── cheatsheets.html ├── features.html ├── getting_started.html ├── goals.html ├── index.html └── mvc.html ├── toc.html ├── tutorial ├── conclusion.html ├── create_news_items.html ├── hard_coded_pages.html ├── index.html ├── news_section.html └── static_pages.html └── userguide.css /.gitignore: -------------------------------------------------------------------------------- 1 | application/cache 2 | application/logs 3 | logs 4 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | AddDefaultCharset UTF-8 2 | 3 | RewriteEngine on 4 | 5 | RewriteBase / 6 | 7 | RewriteCond $1 !^(index\.php) 8 | RewriteCond %{REQUEST_FILENAME} !-f 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)$ /index.php/$1 [L,QSA] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CodeIgniter 2.1 + HMVC + RedBean 3 2 | 3 | Setup ready to use CodeIgniter framework with: 4 | 5 | - [CodeIgniter 2.1.3](http://codeigniter.com) 6 | - [Modular Extensions - HMVC](http://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/overview) 7 | - [RedBean 3.3.7](http//redbeanphp.com) 8 | 9 | ## How to use? 10 | 11 | ### Configuration 12 | 13 | Set up *application/config/config.php* and *application/config/database.php* for your needs. 14 | 15 | Load RedBean library adding it on autoload.php, example: 16 | 17 | $autoload['libraries'] = array('rb'); 18 | 19 | Or load RedBean library in any controller, example: 20 | 21 | $this->load->library('rb'); 22 | 23 | ### Using RedBean 24 | 25 | You can use RedBean API in your controller: 26 | 27 | R::debug(TRUE); 28 | 29 | 30 | Examples: 31 | 32 | // New bean 33 | $post = R::dispense('post'); 34 | 35 | // Load bean by id 36 | $post = R::load('post', 1); 37 | 38 | // Find all beans 39 | $posts = R::find('post'); 40 | 41 | // Find beans 42 | $posts = R::find('post', 'published = 1'); 43 | 44 | // Save bean 45 | R::store($post); 46 | 47 | ### Using HMVC 48 | 49 | With HMVC you can build your application modulair. 50 | 51 | You can find the standard welcome page in: 52 | 53 | /application/modules/welcome/controllers/welcome.php 54 | 55 | ## More information 56 | 57 | - [CodeIgniter user guide](http://codeigniter.com/user_guide) 58 | - [HMVC detail page](https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/overview) 59 | - [RedBean manual](http://www.redbeanphp.com/) 60 | - [RedBean forum](http://groups.google.com/group/redbeanorm) 61 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |Directory access is forbidden.
8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/autoload.php: -------------------------------------------------------------------------------- 1 | '', 5 | 'xhtml1-strict' => '', 6 | 'xhtml1-trans' => '', 7 | 'xhtml1-frame' => '', 8 | 'html5' => '', 9 | 'html4-strict' => '', 10 | 'html4-trans' => '', 11 | 'html4-frame' => '' 12 | ); 13 | 14 | /* End of file doctypes.php */ 15 | /* Location: ./application/config/doctypes.php */ -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 12 | '/ö|œ/' => 'oe', 13 | '/ü/' => 'ue', 14 | '/Ä/' => 'Ae', 15 | '/Ü/' => 'Ue', 16 | '/Ö/' => 'Oe', 17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', 18 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', 19 | '/Ç|Ć|Ĉ|Ċ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/' => 'Y', 50 | '/ý|ÿ|ŷ/' => 'y', 51 | '/Ŵ/' => 'W', 52 | '/ŵ/' => 'w', 53 | '/Ź|Ż|Ž/' => 'Z', 54 | '/ź|ż|ž/' => 'z', 55 | '/Æ|Ǽ/' => 'AE', 56 | '/ß/'=> 'ss', 57 | '/IJ/' => 'IJ', 58 | '/ij/' => 'ij', 59 | '/Œ/' => 'OE', 60 | '/ƒ/' => 'f' 61 | ); 62 | 63 | /* End of file foreign_chars.php */ 64 | /* Location: ./application/config/foreign_chars.php */ -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |Directory access is forbidden.
8 | 9 | 10 |