Category: Fuel PHP

  • 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…

  • Form Programming

    FuelPHP provides three classes, Form Fieldset,, and Input,, to perform Form programming. In this chapter, let us learn Form programming in FuelPHP. Form As discussed earlier, Form class provides methods to create html form elements and the important methods are as follows − open() open() is used to create a new form. It provides the following two parameters − close()…

  • Models & Database

    Model plays an important role in FuelPHP web framework. It represents the business entities of the application. They are either provided by customers or fetched from backend database, manipulated according to the business rules and persisted back into the database. Let us learn about models and how they interact with back-end system in this chapter.…

  • Presenters

    FuelPHP provides an additional layer after the controller to generate views. Once the controller processes the input and is done with the business logic, it sends the control to the Presenter, which takes care of the extra logic such as fetching data from the database, setting view data, etc., and then, calls the View object. We…

  • Views

    View is the presentation layer of the MVC application. It separates the application logic from the presentation logic. When a controller needs to generate HTML, CSS, or any other content then, it forwards the task to the view engine. FuelPHP provides a simple and flexible class, View with all the necessary features of a view engine.…

  • Requests & Response

    HTTP request and HTTP response play an important role in any web application. We need to get the complete details of the http request to process it properly. Once processed, we need to send the processed data to the client through http response. FuelPHP provides excellent Request and Response class to read and write HTTP request and HTTP response…