phpbb\log\log::__construct PHP Method

__construct() public method

Constructor
public __construct ( phpbb\db\driver\driver_interface $db, phpbb\user $user, phpbb\auth\auth $auth, phpbb\event\dispatcher_interface $phpbb_dispatcher, string $phpbb_root_path, string $relative_admin_path, string $php_ext, string $log_table )
$db phpbb\db\driver\driver_interface Database object
$user phpbb\user User object
$auth phpbb\auth\auth Auth object
$phpbb_dispatcher phpbb\event\dispatcher_interface Event dispatcher
$phpbb_root_path string Root path
$relative_admin_path string Relative admin root path
$php_ext string PHP Extension
$log_table string Name of the table we use to store our logs
    public function __construct($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, $relative_admin_path, $php_ext, $log_table)
    {
        $this->db = $db;
        $this->user = $user;
        $this->auth = $auth;
        $this->dispatcher = $phpbb_dispatcher;
        $this->phpbb_root_path = $phpbb_root_path;
        $this->phpbb_admin_path = $this->phpbb_root_path . $relative_admin_path;
        $this->php_ext = $php_ext;
        $this->log_table = $log_table;
        /*
         * IN_ADMIN is set after the session is created,
         * so we need to take ADMIN_START into account as well, otherwise
         * it will not work for the \phpbb\log\log object we create in common.php
         */
        $this->set_is_admin(defined('ADMIN_START') && ADMIN_START || defined('IN_ADMIN') && IN_ADMIN);
        $this->enable();
    }