Because we intend to allow HC and its sub-projects to be bundled with multiple projects (see: https://github.com/themehybrid/hybrid-core/issues/183), we need to account for the repos with functions (not just classes). The easiest way to do this is to wrap each function with a function_exists() check like so:
if ( ! function_exists( __NAMESPACE__ . '\\func_name' ) ) {
// Function
}
Long term, we might consider phasing out functions with a static helper class instead. That way, the class autoloader bypasses the issue (file autoloading doesn't).
Because we intend to allow HC and its sub-projects to be bundled with multiple projects (see: https://github.com/themehybrid/hybrid-core/issues/183), we need to account for the repos with functions (not just classes). The easiest way to do this is to wrap each function with a
function_exists()
check like so:Long term, we might consider phasing out functions with a static helper class instead. That way, the class autoloader bypasses the issue (file autoloading doesn't).