InitializationAddon.php

<?php

namespace Tlf\User;

class InitializationAddon extends \Lia\Addon {

    public string $fqn = 'taeluf:user.risky_initialization';
    //public string $name = 'initialization_addon';
  
    public function __construct(\Tlf\User\Package $package){  
        parent::__construct($package);  

        $this->lia->addon('lia:server.view')
                  ->addDir(__DIR__.'/view/', $package);
        $this->lia->addon('lia:server.router')
                  ->addDirectoryRoutes($package, __DIR__.'/public/',$package->base_url,['.php']);
    }  
  
    /**   
    * Called when Liaison has been setup for the package, but the Package is not fully ready yet.  
    *   
    * For `\Lia\Package` subclasses, call `$package->init_lia()` to invoke every addon's `init_lia($package)` method.  
    * For `\Lia\Package\Server` subclasses, `$package->init_lia()` is automatically called at the end of `__construct()` just before `onPackageReady()` will be called.  
    *   
    */  
    //public function init_lia(?\Lia\Package $package): void{}  
  
    /**  
     * Called when the package is fully setup, for addons to do any final setup steps.  
     *  
     * For `\Lia\Package` subclasses, call `$package->ready()` to invoke every addon's `onPackageReady($package)` method.  
     * For `\Lia\Package\Server` subclasses, `$package->ready()` is automatically called at the VERY end of `__construct()`, AFTER `init_lia($package)` has been called on every addon.  
     */  
    //public function onPackageReady(?\Lia\Package $package): void{}  

}