Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / resultwrapper / ResultWrapper.php
index 88e7cdd..d658c96 100644 (file)
@@ -1,6 +1,10 @@
 <?php
 
-use Wikimedia\Rdbms\IResultWrapper;
+namespace Wikimedia\Rdbms;
+
+use IDatabase;
+use stdClass;
+use RuntimeException;
 
 /**
  * Result wrapper for grabbing data queried from an IDatabase object
@@ -78,7 +82,7 @@ class ResultWrapper implements IResultWrapper {
         */
        private function getDB() {
                if ( !$this->db ) {
-                       throw new RuntimeException( get_class( $this ) . ' needs a DB handle for iteration.' );
+                       throw new RuntimeException( static::class . ' needs a DB handle for iteration.' );
                }
 
                return $this->db;
@@ -115,3 +119,5 @@ class ResultWrapper implements IResultWrapper {
                return $this->current() !== false;
        }
 }
+
+class_alias( ResultWrapper::class, 'ResultWrapper' );