wiki.techinc.nl/includes/libs/rdbms/encasing/LikeMatch.php
Aaron Schulz a57af76a0f Move LikeMatch to Rdbms namespace
Change-Id: I0cba263cd02fc5c4bfe8f063f38d1b4be28246b0
2017-02-06 21:20:39 -08:00

31 lines
587 B
PHP

<?php
namespace Wikimedia\Rdbms;
/**
* Used by Database::buildLike() to represent characters that have special
* meaning in SQL LIKE clauses and thus need no escaping. Don't instantiate it
* manually, use Database::anyChar() and anyString() instead.
*/
class LikeMatch {
/** @var string */
private $str;
/**
* Store a string into a LikeMatch marker object.
*
* @param string $s
*/
public function __construct( $s ) {
$this->str = $s;
}
/**
* Return the original stored string.
*
* @return string
*/
public function toString() {
return $this->str;
}
}