Welcome Guest, Not a member yet? Register   Sign In
Loading vendor helper into global namespace
#3

(05-31-2021, 08:58 PM)InsiteFX Wrote: Look in the root of the app folder just under the Views folder see the file Common.php that is for loading
things you need first.

I've looked into Common.php and I understand that I can define a function there that will be globally accessed. But the question was about loading a Vendor Helper into global namespace and if there is a neat solution for that in CodeIngiter.

At the moment there's also no way of using VENDORPATH in Common.php thus I'm back with requesting my helper almost like I did in app/Config/Autoload.php

PHP Code:
require_onceĀ  '../vendor/myname/mypackage/src/Helpers/myhelper_helper.php'

Is there a way to achieve global namespace helper declaration from within a vendor/..../package without alteration of the main application?
Reply


Messages In This Thread
RE: Loading vendor helper into global namespace - by stopz - 06-01-2021, 02:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB