How can the access to a Manager object be achieved in the App class in PHP?

To access a Manager object in the App class in PHP, we can create an instance of the Manager class within the App class and then use this instance to access the Manager object's methods and properties.

class Manager {
    public function someMethod() {
        // method implementation
    }
}

class App {
    private $manager;

    public function __construct() {
        $this->manager = new Manager();
    }

    public function doSomethingWithManager() {
        $this->manager->someMethod();
    }
}

$app = new App();
$app->doSomethingWithManager();