My question is what is the best way in terms of performance. For example in the application bootstrap process i have a class
<?php
class Application
{
public function __construct()
{
$this->setErrorHandler();
$this->setDatabase();
$this->sessionHandler();
$this->disptachRequest();
}
}
$app = new Application;
Is this a good approach or i should call these methods separately from the variable that holds the object?
I have set those function to private actually that is why i am calling them in constructor. Need guidance if this is good or bad?