public function setProfiler($level = self::PROFILE_ALL, $slowms = 100) {

        return $this->db->command([
            'profile' => (int)$level,
            'slowms'  => (int)$slowms
        ]);
    }
public function setProfiler($level = self::PROFILE_ALL, $slowms = 100) {

        return $this->db->command([
            'profile' => (int)$level,
            'slowms'  => (int)$slowms
        ]);
    }
public function setProfiler ( $ level = self :: PROFILE_ALL , $ slowms = 100 ) { return $ this -> db -> command ( [ 'profile' => ( int ) $ level , 'slowms' => ( int ) $ slowms ] ) ; }
Set MongoDb profiler

@param int $level 0, 1, 2
@param int $slowms slow queries in ms.
@return array
Set MongoDb profiler