src/Service/Emailer.php
public static function discoverTypes(array &$aArray): void
    {
        $aLocations = [
            NAILS_COMMON_PATH . 'config/email_types.php',
        ];

        foreach (Components::modules() as $oModule) {
            $aLocations[] = $oModule->path . $oModule->moduleName . '/config/email_types.php';
        }

        $aLocations[] = NAILS_APP_PATH . 'application/config/email_types.php';

        foreach ($aLocations as $sPath) {
            static::loadTypes($sPath, $aArray);
        }
    }
public static function discoverTypes(array &$aArray): void
    {
        $aLocations = [
            NAILS_COMMON_PATH . 'config/email_types.php',
        ];

        foreach (Components::modules() as $oModule) {
            $aLocations[] = $oModule->path . $oModule->moduleName . '/config/email_types.php';
        }

        $aLocations[] = NAILS_APP_PATH . 'application/config/email_types.php';

        foreach ($aLocations as $sPath) {
            static::loadTypes($sPath, $aArray);
        }
    }
public static function discoverTypes ( array & $ aArray ) : void { $ aLocations = [ NAILS_COMMON_PATH . 'config/email_types.php' , ] ; foreach ( Components :: modules ( ) as $ oModule ) { $ aLocations [ ] = $ oModule -> path . $ oModule -> moduleName . '/config/email_types.php' ; } $ aLocations [ ] = NAILS_APP_PATH . 'application/config/email_types.php' ; foreach ( $ aLocations as $ sPath ) { static :: loadTypes ( $ sPath , $ aArray ) ; } }
Auto-discover all emails supplied by modules and the app

@param array $aArray The array to populate with discoveries
Auto - discover all emails supplied by modules and the app