public function __construct($name, $attributes = null) { parent::__construct($name, $attributes); if (!parent::defaultState()) { $this->sendClientEmail(); session_destroy(); $this->logUtil->enableConsole(); } }