I'm try to work namespaces in a default FuelPHP installation I add the following to the welcome controller (otherwise unedited) and I start getting the error:
ErrorException [ Compile Error ]: Cannot redeclare class Fuel\Controller\Welcome"
The code is the default installation changing the namespace and extends:
<?php
namespace Fuel\Controller;
use Fuel\Core\Controller;
class Welcome extends Controller
{
...
}
This is probably a beginner's question but I just can't figure out why the collision is occurring and I have tried everything I can think of.
EDIT: I even tried putting the following code in front of the class but nothing changed:
if (class_exists("Welcome",false)) {
echo "here. (" . __FILE__ . ":" . __LINE__ . ")\n";
die();
} else {
//Class definition...
}
It looks like you're new here. If you want to get involved, click one of these buttons!