I'm trying to include many files containing functions, classes and calls but I would like to put everything in a PHP namespace. My issue is : all the files are part of another web application core. So I cannot edit the files. Is there a way tu declare a namespace globally for a list of files ? Something like that :
namespace mynamespace {
include_once("file1.inc.php");
include_once("file2.inc.php");
include_once("file3.inc.php");
...
}
Of course I tried this code and it does not work; all my tries failed while the first line of the include files where note namespace mynamespace;.