Welcome Guest, Not a member yet? Register   Sign In
Helper and Library
#4

[eluser]adamp1[/eluser]
Libraries
When we use the term "Libraries" we are normally referring to the classes that are located in the libraries directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create your own libraries within your application/libraries directory in order to maintain separation between your local resources and the global framework resources.

As an added bonus, CodeIgniter permits your libraries to extend native classes if you simply need to add some functionality to an existing library. Or you can even replace native libraries just by placing identically named versions in your application/libraries folder.
More info http://ellislab.com/codeigniter/user-gui...aries.html

Helpers
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.

Unlike most other systems in CodeIgniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions. Each helper function performs one specific task, with no dependence on other functions.

CodeIgniter does not load Helper Files by default, so the first step in using a Helper is to load it. Once loaded, it becomes globally available in your controller and views.

Helpers are typically stored in your system/helpers, or system/application/helpers directory. CodeIgniter will look first in your system/application/helpers directory. If the directory does not exist or the specified helper is not located there CI will instead look in your global system/helpers folder.
http://ellislab.com/codeigniter/user-gui...lpers.html


Messages In This Thread
Helper and Library - by El Forum - 04-19-2010, 04:18 AM
Helper and Library - by El Forum - 04-19-2010, 04:48 AM
Helper and Library - by El Forum - 04-19-2010, 07:19 PM
Helper and Library - by El Forum - 04-20-2010, 12:29 AM
Helper and Library - by El Forum - 04-20-2010, 12:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB