Mark statement constructors internal

parent e603a2e2
# Upgrade to 2.11 # Upgrade to 2.11
## Statement constructors are marked internal
The driver and wrapper statement objects can be only created by the corresponding connection objects.
## The `PingableConnection` interface is deprecated ## The `PingableConnection` interface is deprecated
The wrapper connection will automatically handle the lost connection if the driver supports reporting it. The wrapper connection will automatically handle the lost connection if the driver supports reporting it.
......
...@@ -92,6 +92,8 @@ class DB2Statement implements IteratorAggregate, StatementInterface, Result ...@@ -92,6 +92,8 @@ class DB2Statement implements IteratorAggregate, StatementInterface, Result
private $result = false; private $result = false;
/** /**
* @internal The statement can be only instantiated by its driver connection.
*
* @param resource $stmt * @param resource $stmt
*/ */
public function __construct($stmt) public function __construct($stmt)
......
...@@ -82,6 +82,8 @@ class MysqliStatement implements IteratorAggregate, StatementInterface, Result ...@@ -82,6 +82,8 @@ class MysqliStatement implements IteratorAggregate, StatementInterface, Result
private $result = false; private $result = false;
/** /**
* @internal The statement can be only instantiated by its driver connection.
*
* @param string $prepareString * @param string $prepareString
* *
* @throws MysqliException * @throws MysqliException
......
...@@ -105,6 +105,8 @@ class OCI8Statement implements IteratorAggregate, StatementInterface, Result ...@@ -105,6 +105,8 @@ class OCI8Statement implements IteratorAggregate, StatementInterface, Result
/** /**
* Creates a new OCI8Statement that uses the given connection handle and SQL statement. * Creates a new OCI8Statement that uses the given connection handle and SQL statement.
* *
* @internal The statement can be only instantiated by its driver connection.
*
* @param resource $dbh The connection handle. * @param resource $dbh The connection handle.
* @param string $query The SQL query. * @param string $query The SQL query.
*/ */
......
...@@ -46,6 +46,8 @@ class PDOStatement extends \PDOStatement implements StatementInterface, Result ...@@ -46,6 +46,8 @@ class PDOStatement extends \PDOStatement implements StatementInterface, Result
/** /**
* Protected constructor. * Protected constructor.
*
* @internal The statement can be only instantiated by its driver connection.
*/ */
protected function __construct() protected function __construct()
{ {
......
...@@ -71,6 +71,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement, Result ...@@ -71,6 +71,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement, Result
/** /**
* Prepares given statement for given connection. * Prepares given statement for given connection.
* *
* @internal The statement can be only instantiated by its driver connection.
*
* @param resource $conn The connection resource to use. * @param resource $conn The connection resource to use.
* @param string $sql The SQL statement to prepare. * @param string $sql The SQL statement to prepare.
* *
......
...@@ -136,6 +136,8 @@ class SQLSrvStatement implements IteratorAggregate, StatementInterface, Result ...@@ -136,6 +136,8 @@ class SQLSrvStatement implements IteratorAggregate, StatementInterface, Result
public const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;'; public const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;';
/** /**
* @internal The statement can be only instantiated by its driver connection.
*
* @param resource $conn * @param resource $conn
* @param string $sql * @param string $sql
*/ */
......
...@@ -66,6 +66,8 @@ class Statement implements IteratorAggregate, DriverStatement, Result ...@@ -66,6 +66,8 @@ class Statement implements IteratorAggregate, DriverStatement, Result
/** /**
* Creates a new <tt>Statement</tt> for the given SQL and <tt>Connection</tt>. * Creates a new <tt>Statement</tt> for the given SQL and <tt>Connection</tt>.
* *
* @internal The statement can be only instantiated by {@link Connection}.
*
* @param string $sql The SQL of the statement. * @param string $sql The SQL of the statement.
* @param Connection $conn The connection on which the statement should be executed. * @param Connection $conn The connection on which the statement should be executed.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment