Fuelphp Wiki

General  Model-View-Controller - MVC is an approach to separating your code depending on what role it plays in your application. In the application flow it starts with a controller that is loaded. That Controller executes a method which retrieves data using Models. Once it is done the controller decides what View to load. 

HMVC Requests - HMVC requests are a great way to separate logic and re-use controller logic in multiple places. One common use of this is when you use a theme or template engine to generate your pages, where every page is divided into sections, and sections are populated by widgets. 

Controllers - Controllers are classes that can be reached through the URL and take care of handling the request. A controller calls models and other classes to fetch the information. Finally, it will pass everything to a view for output. 

Models - Whenever data needs to be retrieved, manipulated or deleted this should always be done by a model. A Model is a representation of some kind of data and has the methods to change them. 

Views - Views are files that present data to the browser. These files enable the separation of logic and presentation for your application. Views are typically html, javascript, or css but can contain variables passed into them from the controller. 

ViewModels - Optional; if you don't need them, you can use Views. A ViewModel is a class that contains the logic that is needed to generate your views. 

Routing

Security</li>

Migrations - A convenient way for you to alter your database in a structured and organized manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run them. You’d also have to keep track of which changes need to be run against the production machines next time you deploy. </li>

Coding Standards</li>

Other</li> <ul style="list-style:circle; color:black;"> Classes</li>

Modules - A group of independent MVC elements.</li>

Packages - When it comes to organizing, reuse and share your code, packages are a great way to allow you to do this. They can contain all sorts of code like models, third-party libraries, configs and so on. </li> Tasks - Classes that can be run through the command line or set up as a cron job. </li> </ul>

</ul>

<div style="background-color: #2200ff; padding: 0.5em 1em; font-weight:bold; text-align:center;">Classes <ul> Agent - Allows you to retrieve information about browser type, version, platform or operating system, etc, </li> Arr - A set of helper functions for working with arrays. </li> Asset - A set of methods to help with the collection, grouping and displaying of assets (js, css, img). </li> Autoloader - Contains Fuel's autoloader function. It also supplies methods to interact with the autoloading process. </li> Cache - Allows you to cache the result of a resource heavy operation. </li> Cli - Interact with the command line by accepting input options, parameters and output text. </li> Config - Handles nearly all configuration options in Fuel. Use this class whenever you need to load in a config file, get a value or set a value. </li> Cookie - Allows you to get, set and delete cookies. </li> <li>Crypt - Allows you to encrypt or decrypt a string. Is also used internally (by the Fuel Sessions class for example). </li> <li>Database </li> <li>Date - A set of helper functions for working with dates. Contrary to PHP's DateTime class the Fuel Date class has full support for i18n. </li> <li>Debug - A simple utility for debugging variables, objects, arrays, etc by outputting information to the display. This is not meant as a one-stop-shop to all of your debugging needs, but as a simple way to throw out information quickly to check things as you go. </li> <li>Event - Allows you to interact with the Fuel Core without having to alter any core files. </li> <li>Fieldset - Used to create a form and handle its' validation in an object oriented way. It uses the Form and Validation classes. This class itself is only meant to model the fieldset and its fields while the other two classes do the real work. </li> <li>File - A set of methods to working with files & directories. This can be done through some helper methods or through a more advanced object oriented method where all files and directories are wrapped in objects. </li> <li>Form - The Form class can both be used to create individual form elements or to create a full form along with validation, the latter is done in combination with the Fieldset class. </li> <li>Format - Helps you convert between various formats such as XML, JSON, CSV, etc. </li> <li>Ftp - Allows you to upload, download, move and mirror files with remote servers over the FTP protocol. </li> <li>Fuel - Contains the core methods of the Fuel framework. </li> <li>Html - The html class is an html wrapper for nearly all html tags. </li> <li>Image - Used to easily add common manipulations to an image such as resizing, cropping, and so on. </li> <li>Inflector - Allows you to transforms words from singular to plural, class names to table names, modularized class names to ones without, and class names to foreign keys. </li> <li>Input - Allows you to access HTTP parameters, load server variables and user agent details. </li> <li>Lang - Allows you to set language variables using language files in your application. </li> <li>Log - Allows you to write messages to the log files. </li> <li>Migrate - Allows you to run, walk through and revert Migrations from your controllers. </li> <li>Pagination - Allows you to easily setup pagination for records you display. </li> <li>Redis - Allows you to interact with a Redis key-value store. </li> <li>Request - Processes URI requests. It is used by Fuel in index.php to process the users URI request, and you need it to generates request in an HMVC context. </li> <li>Response - Contains the methods to deal with HTTP response and browser output. </li> <li>Security - Allows you to have CSRF protection in your application. </li> <li>Session - Allows you to maintain state for your application in the stateless environment of the web. It allows you to store variables on the server using a variety of storage solutions, and recall these variables on the next page request. </li> <li>Str - A set of methods to help with the manipulation of strings. </li> <li>Upload - Allows you to securely process files that have been uploaded to the application. It allows you to filter uploads in various ways, define what the destination filenames should look like, or filter on size or length of the filename. </li> <li>Uri - Allows you to interact with the URI. </li> <li>Validation - Helps you validate user input, if you want to create a form & its validation at the same time use the Fieldset class instead </li> <li>View - Acts as an object wrapper for HTML pages with embedded PHP, called "views". Variables can be assigned with the view object and referenced locally within the view. </li> </ul> <div style="background-color: #2200ff; padding: 0.5em 1em; font-weight:bold; text-align:center;">Packages <ul> <li>Oil - The Oil utility is a special package command can be used in several ways to facilitate quick development, help with testing your application and for running Tasks. </li> <li>Auth - The Auth package provides a standardized interface for authentication in Fuel. This allows users to write their own drivers and easily integrate a new driver to work with old code by keeping the basic methods consistent. </li> <li>Orm - Orm is short for Object Relational Mapper which does 2 things: it maps your database table rows to objects and it allows you to establish relations between those objects. </li>