mediawiki.api: Adopt async-await and assert.rejects() in various tests
[mediawiki.git] / includes / libs / rdbms / encasing / LikeMatch.php
blob98812a5a283ac0cd39803fb9cda6eb540ed361c2
1 <?php
3 namespace Wikimedia\Rdbms;
5 /**
6 * Used by Database::buildLike() to represent characters that have special
7 * meaning in SQL LIKE clauses and thus need no escaping. Don't instantiate it
8 * manually, use Database::anyChar() and anyString() instead.
9 */
10 class LikeMatch {
11 /** @var string */
12 private $str;
14 /**
15 * Store a string into a LikeMatch marker object.
17 * @param string $s
19 public function __construct( $s ) {
20 $this->str = $s;
23 /**
24 * Return the original stored string.
26 * @return string
28 public function toString() {
29 return $this->str;