Ans: FuelPHP is PHP Framework written in PHP based on the HMVC pattern.FuelPHP is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start
Ans: PHP 5.4+
Ans: FuelPHPFramework features are:
Ans: There are the following minimum requirements for installing FuelPHPFuelPHP Framework:
Ans:
Ans: In Fuel, there are 4 reserved routes. They are _root_, _403_, _404_ and _500_.
Ans: We can quick install FuelPHP Framework by using some command:
Quick installation using Oil from the web.
$ curl https://get.fuelphp.com/oil | sh
Now that oil is installed, create a blog project in a directory called Sites.
Ans: Controller is a class that contains action methods. It is used to manage HTTP client request and respond back.
All controllers are stored in the fuel/app/classes/controller/ directory.
Example:
classController_Employee extends Controller {
public function action_home() {
echo "FuelPHP-Employee application!";
}
public function action_index() {
echo "This is the index method of employee controller";
}
}
There are two methods in the controller.
Ans: In FuelPHP, Oil package is used for installation, development and testing of application.
Ans: A Presenter is a class that contains the logic. It is needed to generate our view. A Presenter should not do any data manipulation but it can contain database calls or any other retrieval.
To create empty Presenters:
classPresenter_Index extends Presenter
{
--- Body --
}
Ans: In FuelPHP, we can get query by using following steps:
$userQueryToExecute = Model_Article::query()
->select('users')
->where('blocked', '=', 1);
echo
$userQueryToExecute ->get_query();
Ans: try { $redis = \Redis::instance(); } catch(\RedisException $e) { //here error will come }
Ans: Fuel takes security very seriously, and as a result, has implemented the following measures to ensure the safety of your web applications:
Ans: In FuelPHP Session methods are given below table:
Session Methods | Description |
---|---|
set() | It is used to assign a session variable. |
get() | It is used to assign a session variable. |
delete() | It is used to retrieve the stored variable from the sessions. |
create() | It is used to create a new session. |
destroy() | It is used to destroy an existing session. |
Ans: Yes, FuelPHP supports Multilingual.
Related Interview Questions...