<?php
/**
 * @package WavypointPopUps
 */
namespace WavypointPopUps;

final class Init
{
    public static function getServices()
    {
        return [
            Base\Enqueue::class,
            Base\CustomPostType::class,
            Base\Frontend::class,
            Pages\WavyBannerMaker::class,
        ];
    }

    public static function registerServices() {
        foreach ( Self::getServices() as $class ) {
            $service = Self::instantiate( $class );
            if( method_exists( $service, 'register' ) ) {
                $service->register();
            }
        }
    }

    private static function instantiate( $class )
    {
        return new $class();
    }
}
