<?php
/**
 * Base Service Provider
 *
 * @package Licenzo\Framework\Foundation
 */

namespace Licenzo\Framework\Foundation;

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Abstract base service provider class
 */
abstract class ServiceProvider
{
    /**
     * Application instance
     *
     * @var Application
     */
    protected $app;

    /**
     * Constructor
     *
     * @param Application $app
     */
    public function __construct(Application $app)
    {
        $this->app = $app;
    }

    /**
     * Register services into the container
     *
     * This method is called during the registration phase.
     * Use this to bind services, singletons, and other dependencies.
     *
     * @return void
     */
    public function register()
    {
        // Override in child classes
    }

    /**
     * Boot services after all providers have been registered
     *
     * This method is called after all service providers have been registered.
     * Use this to set up event listeners, middleware, routes, etc.
     *
     * @return void
     */
    public function boot()
    {
        // Override in child classes
    }

    /**
     * Terminate and cleanup services
     *
     * This method is called during application shutdown.
     * Use this to clean up resources, close connections, etc.
     *
     * @return void
     */
    public function terminate()
    {
        // Override in child classes
    }

    /**
     * Get the services provided by the provider
     *
     * @return array
     */
    public function provides()
    {
        return [];
    }

}
