FuelPHP provides a functionality in its Autoloader class called "core namespaces" (added via Autoloader::add_core_namespace($namespace)
) which essentially maps the specified namespace into the global namespace, so that core namespaces can be used as if their classes were defined in the global namespace. For example, I can define
namespace This\Is\A;
class Test {}
and then call
Autoloader::add_core_namespace('This\Is\A');
in order to use \Test
to refer to the class normally found at \This\Is\A\Test
.
This is a nice feature, but Eclipse PDT does not know how to handle this and cannot resolve \Test
, putting warnings everywhere that the class is not recognized, instead.
I was wondering if there was a way to manually define these mappings in a project-specific way that Eclipse PDT would recognize.
How about making a file like this? https://gist.github.com/kenjis/2364280