Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 39 and 311]
1 <?php 2 /* 3 * Copyright 2015-2017 MongoDB, Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 namespace MongoDB\Exception; 19 20 class UnsupportedException extends RuntimeException 21 { 22 /** 23 * Thrown when a command's allowDiskUse option is not supported by a server. 24 * 25 * @return self 26 */ 27 public static function allowDiskUseNotSupported() 28 { 29 return new static('The "allowDiskUse" option is not supported by the server executing this operation'); 30 } 31 32 /** 33 * Thrown when array filters are not supported by a server. 34 * 35 * @return self 36 */ 37 public static function arrayFiltersNotSupported() 38 { 39 return new static('Array filters are not supported by the server executing this operation'); 40 } 41 42 /** 43 * Thrown when collations are not supported by a server. 44 * 45 * @return self 46 */ 47 public static function collationNotSupported() 48 { 49 return new static('Collations are not supported by the server executing this operation'); 50 } 51 52 /** 53 * Thrown when the commitQuorum option for createIndexes is not supported 54 * by a server. 55 * 56 * @return self 57 */ 58 public static function commitQuorumNotSupported() 59 { 60 return new static('The "commitQuorum" option is not supported by the server executing this operation'); 61 } 62 63 /** 64 * Thrown when explain is not supported by a server. 65 * 66 * @return self 67 */ 68 public static function explainNotSupported() 69 { 70 return new static('Explain is not supported by the server executing this operation'); 71 } 72 73 /** 74 * Thrown when a command's hint option is not supported by a server. 75 * 76 * @return self 77 */ 78 public static function hintNotSupported() 79 { 80 return new static('Hint is not supported by the server executing this operation'); 81 } 82 83 /** 84 * Thrown when a command's readConcern option is not supported by a server. 85 * 86 * @return self 87 */ 88 public static function readConcernNotSupported() 89 { 90 return new static('Read concern is not supported by the server executing this command'); 91 } 92 93 /** 94 * Thrown when a readConcern is used with a read operation in a transaction. 95 * 96 * @return self 97 */ 98 public static function readConcernNotSupportedInTransaction() 99 { 100 return new static('The "readConcern" option cannot be specified within a transaction. Instead, specify it when starting the transaction.'); 101 } 102 103 /** 104 * Thrown when a command's writeConcern option is not supported by a server. 105 * 106 * @return self 107 */ 108 public static function writeConcernNotSupported() 109 { 110 return new static('Write concern is not supported by the server executing this command'); 111 } 112 113 /** 114 * Thrown when a writeConcern is used with a write operation in a transaction. 115 * 116 * @return self 117 */ 118 public static function writeConcernNotSupportedInTransaction() 119 { 120 return new static('The "writeConcern" option cannot be specified within a transaction. Instead, specify it when starting the transaction.'); 121 } 122 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body