autoload bundles based on namespace.
This commit is contained in:
@@ -361,6 +361,20 @@ function str_finish($value, $cap)
|
||||
return rtrim($value, $cap).$cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the root namespace of a given class.
|
||||
*
|
||||
* @param string $class
|
||||
* @return string
|
||||
*/
|
||||
function root_namespace($class)
|
||||
{
|
||||
if (str_contains($class, '\\'))
|
||||
{
|
||||
return head(explode('\\', $class));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of the given item.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user