Framework helpers, what are they for? Framework helpers, what are they for? codeigniter codeigniter

Framework helpers, what are they for?


A "helper" in many frameworks including CodeIgniter refers to a set of functions that make simple, routine tasks easier to accomplish by grouping multiple processes into a single function.

The official documentation for CodeIgniter helpers can be found here.

It provides the following explanation:

Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular category. There are URL Helpers, that assist in creating links, there are Form Helpers that help you create form elements, Text Helpers perform various text formatting routines, Cookie Helpers set and read cookies, File Helpers help you deal with files, etc.

A list of helper functions and what they do can also be found in the documentation.

Dan

PS. You should not delete any files in the system directory as they may be relied upon within the core. You can create your own helpers which are placed in the application/helpers directory.


Helpers are functions provided to make some tasks easier, like validation or input sanitizing. You shouldn't delete them, and, in fact, should use them as much as possible, because they are usually well done and well tested.


You should never delete files of a library/framework. They are designed to work "as a whole". On the user side there are very less reason, where it make sense to cut a library/framework into pieces. So you will probably win nothing, but with the risk, that you break something.

However, "Helpers" is a generic concept, that provides some simple functionality, that another component may use (or not), without the need to directly implement it. Look at the codeigneter manual for some hints for which part this helpers are good for.