Google News
logo
FuelPHP - Interview Questions
What is a Module namespace in FuelPHP?
One of the problems often encountered when working with independently developed code are class name collisions. For example, a lot of modules come with an admin controller. To avoid collisions, in Fuel every module lives in its own PHP namespace, which must be named identical to the folder name of the module.
<?php
/**
 * Module controller in the Mymodule module
 */

namespace Mymodule;

class Controller_Widget
{

    // put your controller code here, just like for an application controller
}
Advertisement