Welcome Guest, Not a member yet? Register   Sign In
HMVC loading driver across modules
#4

(This post was last modified: 04-25-2016, 04:40 AM by reanvdm.)

For future reference: Note there are two possible errors in the code posted by Orionstar above:

Line 60:
PHP Code:
$msg 'Unable to load the requested driver: '.$class_name

At that point $class_name is not defined, should be $child.

Also, in line 44

Code:
$path = realpath(dirname(__FILE__));

__FILE__ refers to the directory location of Class where the function is defined, ie the parent - not of the class that inherits the definition.
This can be solved with:

PHP Code:
$c = new ReflectionClass($this);
$path realpath(dirname($c->getFileName())); 
Reply


Messages In This Thread
HMVC loading driver across modules - by reanvdm - 04-22-2016, 08:19 AM
RE: HMVC loading driver across modules - by reanvdm - 04-25-2016, 04:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB