Code Igniter
Code Igniter
codeigniter is a MVC based Framework, which is used to develop website or web applications by using
built in features.
It is an open Source framework.
it has a very rich set of functionality, which will increase the speed of website development work.
What is Frameeork?
A framework is a structure that you can build software on.it serves foundation, so you're not starting
entierly from scratch. Frameworks are tipically associated with a specific programming language and
are suited to diffrent types of tasks.
What is hooks ?
hooks are the system events. if we to manage before and after starting application then we will use
hooks for this.
Hokks is use for authantication, hooks like a middleware it checks a code before code execute.
first we have to enable hooks from the config file $config['enable_hooks;]=true;
there are 7 Hook points.
pre_system---veru urly system execution, pre_controller, post_controller_constructor---after
constructer , post_controller , display_override , cache_override , post_system
hooks folder application->hooks->abc.php file.
application: This directory will have your application logic. All of your application codes will be held in
this directory. Internal subdirectories in the CodeIgniter directory structure are given below:
cache – It stores cached files.
config – It keeps configuration files.
controller – All application controllers are defined under this controller.
core – It consists of custom core classes that extend system files. For example, if you create a base
controller that other controllers should extend, then you should place it under this directory.
helpers – This directory will be used for user-defined helper functions.
hooks – It is used for custom hooks in the CodeIgniter folder structure.
language – It is used to store language files for applications that use multiple languages.
libraries – It is used to store custom-created libraries.
logs – Application log files are placed in this directory.
models - All application models must be defined under this directory.
third_party – This is used for custom many packages that are created by you or other developers.
views – application views will be stored in this directory.
system: It consists of the framework core files. It is not advised to make any modifications in this
directory or put your own application code into this directory. System subdirectories in CodeIgniter
are given below:
core – This is considered to be the heart of the CodeIgniter Framework. All of the core files that
construct the framework are located here. If you would like to extend the core file functionality, then
you must
create a custom core file in the application directory. After this, you are allowed to override or add
new behavior that you wish. You should never make any changes directly in this directory.
database – It stores the files such as database drivers, cache, and other files that are needed for
database operations.
fonts – This directory contains fonts and font-related information.
helpers – This directory consists of helper functions that come out of the box.
language – It contains language files that are used by the framework
libraries – It contains the source files for the different libraries that come along with CodeIgniter out
of the box.
user_guide: This directory consists of a user manual for CodeIgniter. You should not upload this
directory during application deployment.
vendor: This directory consists of composer packages source code. The composer.json and
composer.lock are the other two files related to this directory.
index.php: This is considered as the entry point into the application. It is placed inside the root
directory.