You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I'm sure this is a very basic question that everyone but me will know the answer to, but where exactly do all these files go?
1st. namespace PackageLoader <-- root public_html (var/www/project) ? the vendor directory with the composer directory in it? the public folder of the m-v-c pattern that is actually handling the file routing for the site? not sure?
2nd.
// You load the PackageLoader
include DIR.'/PackageLoader.php';
// You load your packages
$loader = new PackageLoader\PackageLoader();
$loader->load(DIR."/vendor/composer");
Is this at the top of all my Controller files? Core files? Module files? Is it only my "composer's autoload.php" file? Where does this go? Is it its own file? Is it actually the same as #3?
3rd.
I'm 99% sure these are the normal calls at the top of a class file call,
// You call the package classes
new CompanyName\PackageName\Machin();
new CompanyName\PackageName\Bidule();
new RoutePlanner\Truc();
new TestNoNamespace();
and can be in any class file, Controller, Module, Core, etc., yes?
When I put the PackageLoader.php in my var/www/package directory where my composer.json file was located, and then changed my composer/autoload.php to be the items in #2, it broke the site, so I was wrong on that assumption. Or maybe I need to then go and update all my class calls on my Controllers?
Sorry for the newbie questions.
The text was updated successfully, but these errors were encountered:
Sorry, I'm sure this is a very basic question that everyone but me will know the answer to, but where exactly do all these files go?
1st. namespace PackageLoader <-- root public_html (var/www/project) ? the vendor directory with the composer directory in it? the public folder of the m-v-c pattern that is actually handling the file routing for the site? not sure?
2nd.
// You load the PackageLoader
include DIR.'/PackageLoader.php';
// You load your packages
$loader = new PackageLoader\PackageLoader();
$loader->load(DIR."/vendor/composer");
Is this at the top of all my Controller files? Core files? Module files? Is it only my "composer's autoload.php" file? Where does this go? Is it its own file? Is it actually the same as #3?
3rd.
I'm 99% sure these are the normal calls at the top of a class file call,
// You call the package classes
new CompanyName\PackageName\Machin();
new CompanyName\PackageName\Bidule();
new RoutePlanner\Truc();
new TestNoNamespace();
and can be in any class file, Controller, Module, Core, etc., yes?
When I put the PackageLoader.php in my var/www/package directory where my composer.json file was located, and then changed my composer/autoload.php to be the items in #2, it broke the site, so I was wrong on that assumption. Or maybe I need to then go and update all my class calls on my Controllers?
Sorry for the newbie questions.
The text was updated successfully, but these errors were encountered: