Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / rdbms / encasing / Blob.php
index bd90330..db5b7e5 100644 (file)
@@ -1,19 +1,21 @@
 <?php
-/**
- * Utility class
- * @ingroup Database
- *
- * This allows us to distinguish a blob from a normal string and an array of strings
- */
-class Blob {
+
+namespace Wikimedia\Rdbms;
+
+class Blob implements IBlob {
        /** @var string */
        protected $mData;
 
-       function __construct( $data ) {
+       /**
+        * @param $data string
+        */
+       public function __construct( $data ) {
                $this->mData = $data;
        }
 
-       function fetch() {
+       public function fetch() {
                return $this->mData;
        }
 }
+
+class_alias( Blob::class, 'Blob' );