Author: Awais Farooq
-
Events
An event is an action or occurrence recognized by the program that may be handled by the program itself. For example, we may define an action or event named my_fuel_event and then do some work whenever the event, my_fuel_event is called. FuelPHP provides class, Event to work with the events in the application. System Events FuelPHP defined some of…
-
Cookie & Session Management
Cookie provides client side data storage and it supports only a small amount of data. Usually, it is 2KB per domain and it depends on the browser. Session provides server side data storage and it supports a large amount of data. Let us go through how to create cookie and session in FuelPHP web application. Cookies FuelPHP provides…
-
Packages
Packages are similar to modules in code reuse but differs in the following ways, In short, packages are not direct web functionalities such as blog, album, etc. Instead, it is a library of functions grouped together such as email processing, document creation, chart creation, authentication, etc. which aids in faster development of the web application.…
-
Modules
Module is a great way to write reusable web functionalities such as blog, album, chat, etc. Module does not disturb the other code in the web application. It lives in its own folder and silently provides its functionality. Modules are simply the same controller, models, and views except that they are grouped, configured, and placed…
-
Themes
Themes are used to enable multiple look and feel for the application. It provides option for the user/developer to change the look and feel of the application without disturbing the functionality of the application. An application can have one or more themes. Each theme lives in its own folder. Let us learn how to create…
-
HMVC Request
FuelPHP provides an excellent feature to request an action inside the same application using Request class. This is called HMVC Request. It enables to reuse the controller logic. Creating a HMVC Request Creating a HMVC request is as simple as creating a request object with the required URL and call the execute method as follows. Working Example…
-
Ajax
AJAX is a modern technology in web programming. It provides options to send and receive data in a webpage asynchronously, without refreshing the page. Let us learn about FuelPHP AJAX programming in this chapter. FuelPHP framework provides options to identity whether the request type is AJAX or not. Input class has a method, is_ajax() for this purpose.…
-
File Uploading
File uploading is one of the most commonly used features in form programming. FuelPHP provides a special class, Upload to handle uploading of files. Let us learn how to upload a file using Upload class in this chapter. Configuration Upload class can be configured using separate configuration file, fuel/app/config/upload.php. The important configuration entries are as follows − Upload…
-
Advanced Form Programming
FuelPHP provides an advanced form programming through Fieldset and Fieldset_Field classes. Fieldset provides an object-oriented way to create a form. It has complete support for models. It has built-in support for client-side and server-side validation as well. To create a full-fledged form, it is enough to create a model with proper form and validation setting. Let us…
-
Validation
Validation is one of the frequent and most repeated tasks in a web application. The user enters the required data in the form and submits it. Then, the web application needs to validate the data before processing the data. For example, the user enters the employee data and the post_action needs to validate before saving it…