Object Life Cycle

#[PostConstruct] is used on methods that need to get executed after dependency injection has finalized to perform any extra initialization.

use Ray\Di\Di\PostConstruct;
#[PostConstruct]
public function init()
{
    //....
}