Commit 874690a3 authored by webchick's avatar webchick

Issue #1614186 by RobLoach, tim.plunkett, msonnabaum, Crell, jhodgdon, Niklas...

Issue #1614186 by RobLoach, tim.plunkett, msonnabaum, Crell, jhodgdon, Niklas Fiekas: Update coding standards for using 'native' PHP classes like stdClass in namespaced code.
parent 5bb0d5e6
......@@ -7,8 +7,6 @@
namespace Drupal\Component\Archiver;
use ZipArchive;
/**
* Defines a archiver implementation for .zip files.
*
......@@ -19,7 +17,7 @@ class Zip implements ArchiverInterface {
/**
* The underlying ZipArchive instance that does the heavy lifting.
*
* @var ZipArchive
* @var \ZipArchive
*/
protected $zip;
......@@ -34,7 +32,7 @@ class Zip implements ArchiverInterface {
* @throws Drupal\Component\Archiver\ArchiverException
*/
public function __construct($file_path) {
$this->zip = new ZipArchive();
$this->zip = new \ZipArchive();
if ($this->zip->open($file_path) !== TRUE) {
throw new ArchiverException(t('Cannot open %file_path', array('%file_path' => $file_path)));
}
......@@ -90,7 +88,7 @@ public function listContents() {
* ZipArchive object for implementation-specific logic. This is for advanced
* use only as it is not shared by other implementations of ArchiveInterface.
*
* @return ZipArchive
* @return \ZipArchive
* The ZipArchive object used by this object.
*/
public function getArchive() {
......
......@@ -7,8 +7,6 @@
namespace Drupal\Component\PhpStorage;
use DirectoryIterator;
/**
* Stores PHP code in files with securely hashed names.
*
......@@ -164,7 +162,7 @@ protected function ensureDirectory() {
*/
protected function cleanDirectory($directory) {
chmod($directory, 0700);
foreach (new DirectoryIterator($directory) as $fileinfo) {
foreach (new \DirectoryIterator($directory) as $fileinfo) {
if (!$fileinfo->isDot()) {
$this->unlink($fileinfo->getPathName());
}
......
......@@ -7,7 +7,6 @@
namespace Drupal\Component\Plugin\Discovery;
use DirectoryIterator;
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
use Drupal\Component\Reflection\MockFileFinder;
use Doctrine\Common\Annotations\AnnotationReader;
......@@ -79,7 +78,7 @@ public function getDefinitions() {
foreach ($dirs as $dir) {
$dir .= DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $namespace);
if (file_exists($dir)) {
foreach (new DirectoryIterator($dir) as $fileinfo) {
foreach (new \DirectoryIterator($dir) as $fileinfo) {
// @todo Once core requires 5.3.6, use $fileinfo->getExtension().
if (pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION) == 'php') {
$class = $namespace . '\\' . $fileinfo->getBasename('.php');
......
......@@ -6,8 +6,6 @@
namespace Drupal\Component\Plugin\Factory;
use ReflectionClass;
/**
* A plugin factory that maps instance configuration to constructor arguments.
*
......@@ -25,7 +23,7 @@ public function createInstance($plugin_id, array $configuration) {
// Lets figure out of there's a constructor for this class and pull
// arguments from the $options array if so to populate it.
$reflector = new ReflectionClass($plugin_class);
$reflector = new \ReflectionClass($plugin_class);
if ($reflector->hasMethod('__construct')) {
$arguments = $this->getInstanceArguments($reflector, $plugin_id, $plugin_definition, $configuration);
$instance = $reflector->newInstanceArgs($arguments);
......@@ -43,7 +41,7 @@ public function createInstance($plugin_id, array $configuration) {
* This is provided as a helper method so factories extending this class can
* replace this and insert their own reflection logic.
*
* @param ReflectionClass $reflector
* @param \ReflectionClass $reflector
* The reflector object being used to inspect the plugin class.
* @param string $plugin_id
* The identifier of the plugin implementation.
......@@ -55,7 +53,7 @@ public function createInstance($plugin_id, array $configuration) {
* @return array
* An array of arguments to be passed to the constructor.
*/
protected function getInstanceArguments(ReflectionClass $reflector, $plugin_id, array $plugin_definition, array $configuration) {
protected function getInstanceArguments(\ReflectionClass $reflector, $plugin_id, array $plugin_definition, array $configuration) {
$arguments = array();
foreach ($reflector->getMethod('__construct')->getParameters() as $param) {
......
......@@ -7,9 +7,7 @@
namespace Drupal\Core\Config;
use RuntimeException;
/**
* A base exception thrown in any configuration system operations.
*/
class ConfigException extends RuntimeException {}
class ConfigException extends \RuntimeException {}
......@@ -10,9 +10,6 @@
use Drupal\Core\Database\TransactionNoActiveException;
use Drupal\Core\Database\TransactionOutOfOrderException;
use PDO;
use PDOException;
/**
* Base Database API class.
*
......@@ -145,13 +142,13 @@ abstract class Connection implements \Serializable {
/**
* Constructs a Connection object.
*/
public function __construct(PDO $connection, array $connection_options) {
public function __construct(\PDO $connection, array $connection_options) {
// Initialize and prepare the connection prefix.
$this->setPrefix(isset($connection_options['prefix']) ? $connection_options['prefix'] : '');
// Set a Statement class, unless the driver opted out.
if (!empty($this->statementClass)) {
$connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, array($this->statementClass, array($this)));
$connection->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array($this->statementClass, array($this)));
}
$this->connection = $connection;
......@@ -181,7 +178,7 @@ public function destroy() {
// Destroy all references to this connection by setting them to NULL.
// The Statement class attribute only accepts a new value that presents a
// proper callable, so we reset it to PDOStatement.
$this->connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array()));
$this->connection->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array()));
$this->schema = NULL;
}
......@@ -233,7 +230,7 @@ public function destroy() {
protected function defaultOptions() {
return array(
'target' => 'default',
'fetch' => PDO::FETCH_OBJ,
'fetch' => \PDO::FETCH_OBJ,
'return' => Database::RETURN_STATEMENT,
'throw_exception' => TRUE,
);
......@@ -518,7 +515,7 @@ protected function filterComment($comment = '') {
* this method will return NULL and may throw an exception if
* $options['throw_exception'] is TRUE.
*
* @throws PDOException
* @throws \PDOException
* @throws \Drupal\Core\Database\IntegrityConstraintViolationException
*/
public function query($query, array $args = array(), $options = array()) {
......@@ -553,10 +550,10 @@ public function query($query, array $args = array(), $options = array()) {
case Database::RETURN_NULL:
return;
default:
throw new PDOException('Invalid return directive: ' . $options['return']);
throw new \PDOException('Invalid return directive: ' . $options['return']);
}
}
catch (PDOException $e) {
catch (\PDOException $e) {
if ($options['throw_exception']) {
// Wrap the exception in another exception, because PHP does not allow
// overriding Exception::getMessage(). Its message is the extra database
......@@ -1101,7 +1098,7 @@ protected function generateTemporaryTableName() {
* Returns the version of the database server.
*/
public function version() {
return $this->connection->getAttribute(PDO::ATTR_SERVER_VERSION);
return $this->connection->getAttribute(\PDO::ATTR_SERVER_VERSION);
}
/**
......@@ -1268,7 +1265,7 @@ public function unserialize($serialized) {
// Re-set a Statement class if necessary.
if (!empty($this->statementClass)) {
$this->connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, array($this->statementClass, array($this)));
$this->connection->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array($this->statementClass, array($this)));
}
}
......
......@@ -7,9 +7,7 @@
namespace Drupal\Core\Database;
use RuntimeException;
/**
* Exception thrown if an undefined database connection is requested.
*/
class ConnectionNotDefinedException extends RuntimeException {}
class ConnectionNotDefinedException extends \RuntimeException {}
......@@ -7,13 +7,11 @@
namespace Drupal\Core\Database;
use RuntimeException;
/**
* This wrapper class serves only to provide additional debug information.
*
* This class will always wrap a PDOException.
*/
class DatabaseExceptionWrapper extends RuntimeException implements DatabaseException {
class DatabaseExceptionWrapper extends \RuntimeException implements DatabaseException {
}
......@@ -15,8 +15,6 @@
use Drupal\Core\Database\DatabaseException;
use Drupal\Core\Database\Connection as DatabaseConnection;
use PDO;
/**
* @addtogroup database
* @{
......@@ -39,7 +37,7 @@ class Connection extends DatabaseConnection {
/**
* Constructs a Connection object.
*/
public function __construct(PDO $connection, array $connection_options = array()) {
public function __construct(\PDO $connection, array $connection_options = array()) {
parent::__construct($connection, $connection_options);
// This driver defaults to transaction support, except if explicitly passed FALSE.
......@@ -71,18 +69,18 @@ public static function open(array &$connection_options = array()) {
'pdo' => array(),
);
$connection_options['pdo'] += array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
// So we don't have to mess around with cursors and unbuffered queries by default.
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE,
\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE,
// Make sure MySQL returns all matched rows on update queries including
// rows that actually didn't have to be updated because the values didn't
// change. This matches common behaviour among other database systems.
PDO::MYSQL_ATTR_FOUND_ROWS => TRUE,
\PDO::MYSQL_ATTR_FOUND_ROWS => TRUE,
// Because MySQL's prepared statements skip the query cache, because it's dumb.
PDO::ATTR_EMULATE_PREPARES => TRUE,
\PDO::ATTR_EMULATE_PREPARES => TRUE,
);
$pdo = new PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
$pdo = new \PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
// Force MySQL to use the UTF-8 character set. Also set the collation, if a
// certain one has been set; otherwise, MySQL defaults to 'utf8_general_ci'
......
......@@ -13,10 +13,6 @@
use Drupal\Core\Database\StatementInterface;
use Drupal\Core\Database\IntegrityConstraintViolationException;
use Locale;
use PDO;
use PDOException;
/**
* @addtogroup database
* @{
......@@ -37,7 +33,7 @@ class Connection extends DatabaseConnection {
/**
* Constructs a connection object.
*/
public function __construct(PDO $connection, array $connection_options) {
public function __construct(\PDO $connection, array $connection_options) {
parent::__construct($connection, $connection_options);
// This driver defaults to transaction support, except if explicitly passed FALSE.
......@@ -89,18 +85,18 @@ public static function open(array &$connection_options = array()) {
'pdo' => array(),
);
$connection_options['pdo'] += array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
// Prepared statements are most effective for performance when queries
// are recycled (used several times). However, if they are not re-used,
// prepared statements become ineffecient. Since most of Drupal's
// prepared queries are not re-used, it should be faster to emulate
// the preparation than to actually ready statements for re-use. If in
// doubt, reset to FALSE and measure performance.
PDO::ATTR_EMULATE_PREPARES => TRUE,
\PDO::ATTR_EMULATE_PREPARES => TRUE,
// Convert numeric values to strings when fetching.
PDO::ATTR_STRINGIFY_FETCHES => TRUE,
\PDO::ATTR_STRINGIFY_FETCHES => TRUE,
);
$pdo = new PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
$pdo = new \PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
return $pdo;
}
......@@ -142,10 +138,10 @@ public function query($query, array $args = array(), $options = array()) {
case Database::RETURN_NULL:
return;
default:
throw new PDOException('Invalid return directive: ' . $options['return']);
throw new \PDOException('Invalid return directive: ' . $options['return']);
}
}
catch (PDOException $e) {
catch (\PDOException $e) {
if ($options['throw_exception']) {
// Match all SQLSTATE 23xxx errors.
if (substr($e->getCode(), -6, -3) == '23') {
......@@ -209,7 +205,7 @@ public function createDatabase($database) {
// If the PECL intl extension is installed, use it to determine the proper
// locale. Otherwise, fall back to en_US.
if (class_exists('Locale')) {
$locale = Locale::getDefault();
$locale = \Locale::getDefault();
}
else {
$locale = 'en_US';
......
......@@ -10,8 +10,6 @@
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Query\Insert as QueryInsert;
use PDO;
/**
* @ingroup database
* @{
......@@ -39,7 +37,7 @@ public function execute() {
fwrite($blobs[$blob_count], $insert_values[$idx]);
rewind($blobs[$blob_count]);
$stmt->bindParam(':db_insert_placeholder_' . $max_placeholder++, $blobs[$blob_count], PDO::PARAM_LOB);
$stmt->bindParam(':db_insert_placeholder_' . $max_placeholder++, $blobs[$blob_count], \PDO::PARAM_LOB);
// Pre-increment is faster in PHP than increment.
++$blob_count;
......
......@@ -10,8 +10,6 @@
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Query\Update as QueryUpdate;
use PDO;
class Update extends QueryUpdate {
public function execute() {
......@@ -48,7 +46,7 @@ public function execute() {
$blobs[$blob_count] = fopen('php://memory', 'a');
fwrite($blobs[$blob_count], $value);
rewind($blobs[$blob_count]);
$stmt->bindParam($placeholder, $blobs[$blob_count], PDO::PARAM_LOB);
$stmt->bindParam($placeholder, $blobs[$blob_count], \PDO::PARAM_LOB);
++$blob_count;
}
else {
......
......@@ -15,9 +15,6 @@
use Drupal\Core\Database\Driver\sqlite\Statement;
use Drupal\Core\Database\Connection as DatabaseConnection;
use PDO;
use SplFileInfo;
/**
* Specific SQLite implementation of DatabaseConnection.
*/
......@@ -68,7 +65,7 @@ class Connection extends DatabaseConnection {
/**
* Constructs a \Drupal\Core\Database\Driver\sqlite\Connection object.
*/
public function __construct(PDO $connection, array $connection_options) {
public function __construct(\PDO $connection, array $connection_options) {
parent::__construct($connection, $connection_options);
// We don't need a specific PDOStatement class here, we simulate it below.
......@@ -112,11 +109,11 @@ public static function open(array &$connection_options = array()) {
'pdo' => array(),
);
$connection_options['pdo'] += array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
// Convert numeric values to strings when fetching.
PDO::ATTR_STRINGIFY_FETCHES => TRUE,
\PDO::ATTR_STRINGIFY_FETCHES => TRUE,
);
$pdo = new PDO('sqlite:' . $connection_options['database'], '', '', $connection_options['pdo']);
$pdo = new \PDO('sqlite:' . $connection_options['database'], '', '', $connection_options['pdo']);
// Create functions needed by SQLite.
$pdo->sqliteCreateFunction('if', array(__CLASS__, 'sqlFunctionIf'));
......
......@@ -10,9 +10,6 @@
use Drupal\Core\Database\StatementPrefetch;
use Drupal\Core\Database\StatementInterface;
use Iterator;
use PDOException;
/**
* Specific SQLite implementation of DatabaseConnection.
*
......@@ -22,7 +19,7 @@
* user-space mock of PDOStatement that buffers all the data and doesn't
* have those limitations.
*/
class Statement extends StatementPrefetch implements Iterator, StatementInterface {
class Statement extends StatementPrefetch implements \Iterator, StatementInterface {
/**
* SQLite specific implementation of getStatement().
......@@ -94,7 +91,7 @@ public function execute($args = array(), $options = array()) {
try {
$return = parent::execute($args, $options);
}
catch (PDOException $e) {
catch (\PDOException $e) {
if (!empty($e->errorInfo[1]) && $e->errorInfo[1] === 17) {
// The schema has changed. SQLite specifies that we must resend the query.
$return = parent::execute($args, $options);
......
......@@ -7,9 +7,7 @@
namespace Drupal\Core\Database;
use RuntimeException;
/**
* Exception thrown if no driver is specified for a database connection.
*/
class DriverNotSpecifiedException extends RuntimeException {}
class DriverNotSpecifiedException extends \RuntimeException {}
......@@ -7,9 +7,7 @@
namespace Drupal\Core\Database\Install;
use RuntimeException;
/**
* Exception thrown if the database installer fails.
*/
class TaskException extends RuntimeException { }
class TaskException extends \RuntimeException { }
......@@ -9,8 +9,6 @@
use Drupal\Core\Database\Database;
use PDO;
/**
* Database installer structure.
*
......@@ -80,7 +78,7 @@ abstract class Tasks {
* Ensure the PDO driver is supported by the version of PHP in use.
*/
protected function hasPdoDriver() {
return in_array($this->pdoDriver, PDO::getAvailableDrivers());
return in_array($this->pdoDriver, \PDO::getAvailableDrivers());
}
/**
......
......@@ -7,12 +7,10 @@
namespace Drupal\Core\Database;
use RuntimeException;
/**
* Exception thrown if a query would violate an integrity constraint.
*
* This exception is thrown e.g. when trying to insert a row that would violate
* a unique key constraint.
*/
class IntegrityConstraintViolationException extends RuntimeException implements DatabaseException { }
class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException { }
......@@ -9,12 +9,10 @@
use Drupal\Core\Database\Connection;
use Countable;
/**
* Generic class for a series of conditions in a query.
*/
class Condition implements ConditionInterface, Countable {
class Condition implements ConditionInterface, \Countable {
/**
* Array of conditions.
......
......@@ -9,12 +9,10 @@
use Drupal\Core\Database\DatabaseException;
use InvalidArgumentException;
/**
* Exception thrown if an insert query specifies a field twice.
*
* It is not allowed to specify a field as default and insert field, this
* exception is thrown if that is the case.
*/
class FieldsOverlapException extends InvalidArgumentException implements DatabaseException {}
class FieldsOverlapException extends \InvalidArgumentException implements DatabaseException {}
......@@ -9,12 +9,10 @@
use Drupal\Core\Database\DatabaseException;
use InvalidArgumentException;
/**
* Exception thrown for merge queries that do not make semantic sense.
*
* There are many ways that a merge query could be malformed. They should all
* throw this exception and set an appropriately descriptive message.
*/
class InvalidMergeQueryException extends InvalidArgumentException implements DatabaseException {}
class InvalidMergeQueryException extends \InvalidArgumentException implements DatabaseException {}
......@@ -9,9 +9,7 @@
use Drupal\Core\Database\DatabaseException;
use InvalidArgumentException;
/**
* Exception thrown if an insert query doesn't specify insert or default fields.
*/
class NoFieldsException extends InvalidArgumentException implements DatabaseException {}
class NoFieldsException extends \InvalidArgumentException implements DatabaseException {}
......@@ -7,9 +7,7 @@
namespace Drupal\Core\Database;
use RuntimeException;
/**
* Base exception for Schema-related errors.
*/
class SchemaException extends RuntimeException implements DatabaseException { }
class SchemaException extends \RuntimeException implements DatabaseException { }
......@@ -7,13 +7,10 @@
namespace Drupal\Core\Database;
use PDO;
use PDOStatement;
/**
* Default implementation of StatementInterface.
*
* PDO allows us to extend the PDOStatement class to provide additional
* \PDO allows us to extend the \PDOStatement class to provide additional
* functionality beyond that offered by default. We do need extra
* functionality. By default, this class is not driver-specific. If a given
* driver needs to set a custom statement class, it may do so in its
......@@ -21,12 +18,12 @@
*
* @see http://php.net/pdostatement
*/
class Statement extends PDOStatement implements StatementInterface {
class Statement extends \PDOStatement implements StatementInterface {
/**
* Reference to the database connection object for this statement.
*
* The name $dbh is inherited from PDOStatement.
* The name $dbh is inherited from \PDOStatement.
*
* @var \Drupal\Core\Database\Connection
*/
......@@ -34,15 +31,15 @@ class Statement extends PDOStatement implements StatementInterface {
protected function __construct(Connection $dbh) {
$this->dbh = $dbh;
$this->setFetchMode(PDO::FETCH_OBJ);
$this->setFetchMode(\PDO::FETCH_OBJ);
}
public function execute($args = array(), $options = array()) {
if (isset($options['fetch'])) {
if (is_string($options['fetch'])) {
// PDO::FETCH_PROPS_LATE tells __construct() to run before properties
// \PDO::FETCH_PROPS_LATE tells __construct() to run before properties
// are added to the object.
$this->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $options['fetch']);
$this->setFetchMode(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $options['fetch']);
}
else {
$this->setFetchMode($options['fetch']);
......@@ -69,14 +66,14 @@ public function getQueryString() {
}
public function fetchCol($index = 0) {
return $this->fetchAll(PDO::FETCH_COLUMN, $index);
return $this->fetchAll(\PDO::FETCH_COLUMN, $index);
}
public function fetchAllAssoc($key, $fetch = NULL) {
$return = array();
if (isset($fetch)) {
if (is_string($fetch)) {
$this->setFetchMode(PDO::FETCH_CLASS, $fetch);
$this->setFetchMode(\PDO::FETCH_CLASS, $fetch);
}
else {
$this->setFetchMode($fetch);
......@@ -93,7 +90,7 @@ public function fetchAllAssoc($key, $fetch = NULL) {
public function fetchAllKeyed($key_index = 0, $value_index = 1) {
$return = array();
$this->setFetchMode(PDO::FETCH_NUM);
$this->setFetchMode(\PDO::FETCH_NUM);
foreach ($this as $record) {
$return[$record[$key_index]] = $record[$value_index];
}
......@@ -101,12 +98,12 @@ public function fetchAllKeyed($key_index = 0, $value_index = 1) {
}
public function fetchField($index = 0) {
// Call PDOStatement::fetchColumn to fetch the field.
// Call \PDOStatement::fetchColumn to fetch the field.
return $this->fetchColumn($index);
}
public function fetchAssoc() {
// Call PDOStatement::fetch to fetch the row.
return $this->fetch(PDO::FETCH_ASSOC);
// Call \PDOStatement::fetch to fetch the row.
return $this->fetch(\PDO::FETCH_ASSOC);
}
}
......@@ -7,7 +7,6 @@
namespace Drupal\Core\Database;
use Iterator;
/**
* Empty implementation of a database statement.
......@@ -20,7 +19,7 @@
*
* @see Drupal\search\SearchQuery
*/
class StatementEmpty implements Iterator, StatementInterface {
class StatementEmpty implements \Iterator, StatementInterface {
public function execute($args = array(), $options = array()) {
return FALSE;
......
......@@ -7,8 +7,6 @@
namespace Drupal\Core\Database;
use Traversable;
/**
* Represents a prepared statement.
*
......@@ -28,7 +26,7 @@
* class Drupal\Core\Database\Driver\oracle\Statement implements Iterator, Drupal\Core\Database\StatementInterface {}
* @endcode
*/
interface StatementInterface extends Traversable {
interface StatementInterface extends \Traversable {
/**
* Constructs a new PDOStatement object.
......
......@@ -8,17 +8,14 @@
namespace Drupal\Core\Database;
use Drupal\Core\Database\Connection;
use Iterator;
use PDO;
use PDOException;
/**
* An implementation of StatementInterface that prefetches all data.
*
* This class behaves very similar to a PDOStatement but as it always fetches
* This class behaves very similar to a \PDOStatement but as it always fetches
* every row it is possible to manipulate those results.
*/
class StatementPrefetch implements Iterator, StatementInterface {
class StatementPrefetch implements \Iterator, StatementInterface {
/**
* The query string.
......@@ -37,9 +34,9 @@ class StatementPrefetch implements Iterator, StatementInterface {
/**
* Reference to the database connection object for this statement.
*
* This is part of the public interface