Commit 93d6bd70 authored by Gabriel Caruso's avatar Gabriel Caruso

Whitespaces clean-up in docs

parent 00381a6b
...@@ -337,7 +337,6 @@ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ...@@ -337,7 +337,6 @@ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
License is not intended to restrict the license of any rights under License is not intended to restrict the license of any rights under
applicable law. applicable law.
Creative Commons Notice Creative Commons Notice
Creative Commons is not a party to this License, and makes no warranty Creative Commons is not a party to this License, and makes no warranty
...@@ -360,4 +359,4 @@ Creative Commons Notice ...@@ -360,4 +359,4 @@ Creative Commons Notice
this trademark restriction does not form part of this License. this trademark restriction does not form part of this License.
Creative Commons may be contacted at http://creativecommons.org/. Creative Commons may be contacted at http://creativecommons.org/.
...@@ -8,7 +8,6 @@ Using Ubuntu 14.04 LTS: ...@@ -8,7 +8,6 @@ Using Ubuntu 14.04 LTS:
It will generate the documentation into the build directory of the checkout. It will generate the documentation into the build directory of the checkout.
## Theme issues ## Theme issues
If you get a "Theme error", check if the `en/_theme` subdirectory is empty, If you get a "Theme error", check if the `en/_theme` subdirectory is empty,
......
...@@ -45,7 +45,6 @@ Drivers ...@@ -45,7 +45,6 @@ Drivers
The drivers abstract a PHP specific database API by enforcing two The drivers abstract a PHP specific database API by enforcing two
interfaces: interfaces:
- ``\Doctrine\DBAL\Driver\Connection`` - ``\Doctrine\DBAL\Driver\Connection``
- ``\Doctrine\DBAL\Driver\Statement`` - ``\Doctrine\DBAL\Driver\Statement``
...@@ -85,4 +84,3 @@ generation of types between Databases and PHP. Doctrine comes ...@@ -85,4 +84,3 @@ generation of types between Databases and PHP. Doctrine comes
bundled with some common types but offers the ability for bundled with some common types but offers the ability for
developers to define custom types or extend existing ones easily. developers to define custom types or extend existing ones easily.
...@@ -45,7 +45,6 @@ object is closed: ...@@ -45,7 +45,6 @@ object is closed:
$data = $stmt->fetchAll(); $data = $stmt->fetchAll();
$stmt->closeCursor(); // at this point the result is cached $stmt->closeCursor(); // at this point the result is cached
.. warning:: .. warning::
When using the cache layer not all fetch modes are supported. See the code of the `ResultCacheStatement <https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php>`_ for details. When using the cache layer not all fetch modes are supported. See the code of the `ResultCacheStatement <https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php>`_ for details.
...@@ -117,14 +117,12 @@ database name:: ...@@ -117,14 +117,12 @@ database name::
``charset`` connection parameter next to ``url``, to provide a ``charset`` connection parameter next to ``url``, to provide a
default value in case the URL doesn't contain a charset value. default value in case the URL doesn't contain a charset value.
Driver Driver
~~~~~~ ~~~~~~
The driver specifies the actual implementations of the DBAL The driver specifies the actual implementations of the DBAL
interfaces to use. It can be configured in one of three ways: interfaces to use. It can be configured in one of three ways:
- ``driver``: The built-in driver implementation to use. The - ``driver``: The built-in driver implementation to use. The
following drivers are currently available: following drivers are currently available:
...@@ -172,11 +170,9 @@ options recognized by each built-in driver. ...@@ -172,11 +170,9 @@ options recognized by each built-in driver.
When using an existing PDO instance through the ``pdo`` When using an existing PDO instance through the ``pdo``
option, specifying connection details is obviously not necessary. option, specifying connection details is obviously not necessary.
pdo\_sqlite pdo\_sqlite
^^^^^^^^^^^ ^^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -190,7 +186,6 @@ pdo\_sqlite ...@@ -190,7 +186,6 @@ pdo\_sqlite
pdo\_mysql pdo\_mysql
^^^^^^^^^^ ^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -223,7 +218,6 @@ or ``/etc/drizzle/conf.d/mysql-unix-socket-protocol.cnf`` and restarting the dri ...@@ -223,7 +218,6 @@ or ``/etc/drizzle/conf.d/mysql-unix-socket-protocol.cnf`` and restarting the dri
mysqli mysqli
^^^^^^ ^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -245,7 +239,6 @@ mysqli ...@@ -245,7 +239,6 @@ mysqli
pdo\_pgsql pdo\_pgsql
^^^^^^^^^^ ^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -268,11 +261,11 @@ pdo\_pgsql ...@@ -268,11 +261,11 @@ pdo\_pgsql
See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
- ``sslcert`` (string): specifies the file name of the client SSL certificate. - ``sslcert`` (string): specifies the file name of the client SSL certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT` See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
- ``sslkey`` (string): specifies the location for the secret key used for the - ``sslkey`` (string): specifies the location for the secret key used for the
client certificate. client certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY` See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
- ``sslcrl`` (string): specifies the file name of the SSL certificate - ``sslcrl`` (string): specifies the file name of the SSL certificate
revocation list (CRL). revocation list (CRL).
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL` See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
- ``application_name`` (string): Name of the application that is - ``application_name`` (string): Name of the application that is
connecting to database. Optional. It will be displayed at ``pg_stat_activity``. connecting to database. Optional. It will be displayed at ``pg_stat_activity``.
...@@ -285,7 +278,6 @@ and ``'false'`` as strings you can change to integers by using: ...@@ -285,7 +278,6 @@ and ``'false'`` as strings you can change to integers by using:
pdo\_oci / oci8 pdo\_oci / oci8
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -318,7 +310,6 @@ pdo\_oci / oci8 ...@@ -318,7 +310,6 @@ pdo\_oci / oci8
pdo\_sqlsrv / sqlsrv pdo\_sqlsrv / sqlsrv
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
...@@ -330,7 +321,6 @@ pdo\_sqlsrv / sqlsrv ...@@ -330,7 +321,6 @@ pdo\_sqlsrv / sqlsrv
sqlanywhere sqlanywhere
^^^^^^^^^^^ ^^^^^^^^^^^
- ``user`` (string): Username to use when connecting to the - ``user`` (string): Username to use when connecting to the
database. database.
- ``password`` (string): Password to use when connecting to the - ``password`` (string): Password to use when connecting to the
......
...@@ -50,7 +50,7 @@ several drawbacks: ...@@ -50,7 +50,7 @@ several drawbacks:
- There is no way to add dynamic parameters to the SQL query without modifying - There is no way to add dynamic parameters to the SQL query without modifying
``$sql`` itself. This can easily lead to a category of security ``$sql`` itself. This can easily lead to a category of security
holes called **SQL injection**, where a third party can modify the SQL executed holes called **SQL injection**, where a third party can modify the SQL executed
and even execute their own queries through clever exploiting of the security hole. and even execute their own queries through clever exploiting of the security hole.
- **Quoting** dynamic parameters for an SQL query is tedious work and requires lots - **Quoting** dynamic parameters for an SQL query is tedious work and requires lots
of use of the ``Doctrine\DBAL\Connection#quote()`` method, which makes the of use of the ``Doctrine\DBAL\Connection#quote()`` method, which makes the
...@@ -60,7 +60,7 @@ several drawbacks: ...@@ -60,7 +60,7 @@ several drawbacks:
it could re-use this information easily using a technique called **prepared statements**. it could re-use this information easily using a technique called **prepared statements**.
These three arguments and some more technical details hopefully convinced you to investigate These three arguments and some more technical details hopefully convinced you to investigate
prepared statements for accessing your database. prepared statements for accessing your database.
Dynamic Parameters and Prepared Statements Dynamic Parameters and Prepared Statements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -190,7 +190,7 @@ If you don't specify an integer (through a ``PDO::PARAM*`` constant) to ...@@ -190,7 +190,7 @@ If you don't specify an integer (through a ``PDO::PARAM*`` constant) to
any of the parameter binding methods but a string, Doctrine DBAL will any of the parameter binding methods but a string, Doctrine DBAL will
ask the type abstraction layer to convert the passed value from ask the type abstraction layer to convert the passed value from
its PHP to a database representation. This way you can pass ``\DateTime`` its PHP to a database representation. This way you can pass ``\DateTime``
instances to a prepared statement and have Doctrine convert them instances to a prepared statement and have Doctrine convert them
to the appropriate vendors database format: to the appropriate vendors database format:
.. code-block:: php .. code-block:: php
...@@ -302,7 +302,7 @@ Prepare a given SQL statement and return the ...@@ -302,7 +302,7 @@ Prepare a given SQL statement and return the
$statement = $conn->prepare('SELECT * FROM user'); $statement = $conn->prepare('SELECT * FROM user');
$statement->execute(); $statement->execute();
$users = $statement->fetchAll(); $users = $statement->fetchAll();
/* /*
array( array(
0 => array( 0 => array(
...@@ -340,7 +340,7 @@ parameters to the execute method, then returning the statement: ...@@ -340,7 +340,7 @@ parameters to the execute method, then returning the statement:
<?php <?php
$statement = $conn->executeQuery('SELECT * FROM user WHERE username = ?', array('jwage')); $statement = $conn->executeQuery('SELECT * FROM user WHERE username = ?', array('jwage'));
$user = $statement->fetch(); $user = $statement->fetch();
/* /*
array( array(
0 => 'jwage', 0 => 'jwage',
...@@ -362,7 +362,7 @@ Execute the query and fetch all results into an array: ...@@ -362,7 +362,7 @@ Execute the query and fetch all results into an array:
<?php <?php
$users = $conn->fetchAll('SELECT * FROM user'); $users = $conn->fetchAll('SELECT * FROM user');
/* /*
array( array(
0 => array( 0 => array(
...@@ -381,7 +381,7 @@ Numeric index retrieval of first result row of the given query: ...@@ -381,7 +381,7 @@ Numeric index retrieval of first result row of the given query:
<?php <?php
$user = $conn->fetchArray('SELECT * FROM user WHERE username = ?', array('jwage')); $user = $conn->fetchArray('SELECT * FROM user WHERE username = ?', array('jwage'));
/* /*
array( array(
0 => 'jwage', 0 => 'jwage',
......
...@@ -20,7 +20,6 @@ instance. ...@@ -20,7 +20,6 @@ instance.
Doctrine ships with one implementation for the "PostConnect" event: Doctrine ships with one implementation for the "PostConnect" event:
- ``Doctrine\DBAL\Event\Listeners\OracleSessionInit`` allows to - ``Doctrine\DBAL\Event\Listeners\OracleSessionInit`` allows to
specify any number of Oracle Session related enviroment variables specify any number of Oracle Session related enviroment variables
that are set right after the connection is established. that are set right after the connection is established.
...@@ -35,9 +34,8 @@ instance passed to the Connection factory: ...@@ -35,9 +34,8 @@ instance passed to the Connection factory:
$evm->addEventSubscriber(new OracleSessionInit(array( $evm->addEventSubscriber(new OracleSessionInit(array(
'NLS_TIME_FORMAT' => 'HH24:MI:SS', 'NLS_TIME_FORMAT' => 'HH24:MI:SS',
))); )));
$conn = DriverManager::getConnection($connectionParams, null, $evm);
$conn = DriverManager::getConnection($connectionParams, null, $evm);
Schema Events Schema Events
------------- -------------
...@@ -93,7 +91,6 @@ for event listeners. ...@@ -93,7 +91,6 @@ for event listeners.
It allows you to access the ``Doctrine\DBAL\Schema\Table`` instance and its columns, the used Platform and It allows you to access the ``Doctrine\DBAL\Schema\Table`` instance and its columns, the used Platform and
provides a way to add additional SQL statements. provides a way to add additional SQL statements.
OnSchemaCreateTableColumn Event OnSchemaCreateTableColumn Event
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
...@@ -45,4 +45,3 @@ Now you are able to load classes that are in the ...@@ -45,4 +45,3 @@ Now you are able to load classes that are in the
use later in this documentation to configure our first Doctrine use later in this documentation to configure our first Doctrine
DBAL connection. DBAL connection.
...@@ -35,7 +35,6 @@ passing the date to the constructor of ``DateTime``. ...@@ -35,7 +35,6 @@ passing the date to the constructor of ``DateTime``.
This is why Doctrine always wants to create the time related types This is why Doctrine always wants to create the time related types
without microseconds: without microseconds:
- DateTime to ``TIMESTAMP(0) WITHOUT TIME ZONE`` - DateTime to ``TIMESTAMP(0) WITHOUT TIME ZONE``
- DateTimeTz to ``TIMESTAMP(0) WITH TIME ZONE`` - DateTimeTz to ``TIMESTAMP(0) WITH TIME ZONE``
- Time to ``TIME(0) WITHOUT TIME ZONE`` - Time to ``TIME(0) WITHOUT TIME ZONE``
......
...@@ -108,4 +108,3 @@ Oracle NUMBER should be handled as integer. Doctrine 2 offers a ...@@ -108,4 +108,3 @@ Oracle NUMBER should be handled as integer. Doctrine 2 offers a
powerful way to abstract the database to php and back conversion, powerful way to abstract the database to php and back conversion,
which is described in the next section. which is described in the next section.
...@@ -25,7 +25,6 @@ available methods to learn about your database schema: ...@@ -25,7 +25,6 @@ available methods to learn about your database schema:
when you accept data from user- or other sources not under your when you accept data from user- or other sources not under your
control. control.
listDatabases() listDatabases()
--------------- ---------------
...@@ -227,11 +226,10 @@ table: ...@@ -227,11 +226,10 @@ table:
<?php <?php
print_r($sql); print_r($sql);
/* /*
array( array(
0 => 'DROP TABLE user' 0 => 'DROP TABLE user'
) )
*/ */
...@@ -269,7 +269,6 @@ you have to sort the data in the application. ...@@ -269,7 +269,6 @@ you have to sort the data in the application.
$sql = "SELECT * FROM customers"; $sql = "SELECT * FROM customers";
$rows = $shardManager->queryAll($sql, $params); $rows = $shardManager->queryAll($sql, $params);
Schema Operations: SchemaSynchronizer Interface Schema Operations: SchemaSynchronizer Interface
----------------------------------------------- -----------------------------------------------
......
...@@ -5,7 +5,6 @@ To support a database which is not currently shipped with Doctrine ...@@ -5,7 +5,6 @@ To support a database which is not currently shipped with Doctrine
you have to implement the following interfaces and abstract you have to implement the following interfaces and abstract
classes: classes:
- ``\Doctrine\DBAL\Driver\Connection`` - ``\Doctrine\DBAL\Driver\Connection``
- ``\Doctrine\DBAL\Driver\Statement`` - ``\Doctrine\DBAL\Driver\Statement``
- ``\Doctrine\DBAL\Driver`` - ``\Doctrine\DBAL\Driver``
...@@ -20,7 +19,6 @@ several Abstract Unittests in the ``\Doctrine\Tests\DBAL`` package ...@@ -20,7 +19,6 @@ several Abstract Unittests in the ``\Doctrine\Tests\DBAL`` package
to check if your platform behaves like all the others which is to check if your platform behaves like all the others which is
necessary for SchemaTool support, namely: necessary for SchemaTool support, namely:
- ``\Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase`` - ``\Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase``
- ``\Doctrine\Tests\DBAL\Functional\Schema\AbstractSchemaManagerTestCase`` - ``\Doctrine\Tests\DBAL\Functional\Schema\AbstractSchemaManagerTestCase``
......
...@@ -174,7 +174,6 @@ you can disable auto-commit mode with ``setAutoCommit(false)``. ...@@ -174,7 +174,6 @@ you can disable auto-commit mode with ``setAutoCommit(false)``.
// still transactional // still transactional
.. note:: .. note::
Changing auto-commit mode during an active transaction, implicitly Changing auto-commit mode during an active transaction, implicitly
...@@ -199,7 +198,6 @@ you can disable auto-commit mode with ``setAutoCommit(false)``. ...@@ -199,7 +198,6 @@ you can disable auto-commit mode with ``setAutoCommit(false)``.
// enable auto-commit again, commits currently active transaction // enable auto-commit again, commits currently active transaction
$conn->setAutoCommit(true); // does not start a new transaction automatically $conn->setAutoCommit(true); // does not start a new transaction automatically
Committing or rolling back an active transaction will of course only Committing or rolling back an active transaction will of course only
open up a new transaction automatically if the particular action causes open up a new transaction automatically if the particular action causes
the transaction context of a connection to terminate. the transaction context of a connection to terminate.
...@@ -230,13 +228,11 @@ by this behaviour. ...@@ -230,13 +228,11 @@ by this behaviour.
$conn->rollBack(); // rolls back outer transaction, and immediately starts a new one $conn->rollBack(); // rolls back outer transaction, and immediately starts a new one
} }
To initialize a ``Doctrine\DBAL\Connection`` with auto-commit disabled, To initialize a ``Doctrine\DBAL\Connection`` with auto-commit disabled,
you can also use the ``Doctrine\DBAL\Configuration`` container to modify the you can also use the ``Doctrine\DBAL\Configuration`` container to modify the
default auto-commit mode via ``Doctrine\DBAL\Configuration::setAutoCommit(false)`` default auto-commit mode via ``Doctrine\DBAL\Configuration::setAutoCommit(false)``
and pass it to a ``Doctrine\DBAL\Connection`` when instantiating. and pass it to a ``Doctrine\DBAL\Connection`` when instantiating.
Error handling Error handling
-------------- --------------
...@@ -255,12 +251,11 @@ A practical example is as follows: ...@@ -255,12 +251,11 @@ A practical example is as follows:
// retry the processing // retry the processing
} }
If you need stricter control, you can catch the concrete exceptions directly: If you need stricter control, you can catch the concrete exceptions directly:
- ``Doctrine\DBAL\Exception\DeadlockException``: this can happen when each member - ``Doctrine\DBAL\Exception\DeadlockException``: this can happen when each member
of a group of actions is waiting for some other member to release a shared lock. of a group of actions is waiting for some other member to release a shared lock.
- ``Doctrine\DBAL\Exception\LockWaitTimeoutException``: this exception happens when - ``Doctrine\DBAL\Exception\LockWaitTimeoutException``: this exception happens when
a transaction has to wait a considerable amount of time to obtain a lock, even if a transaction has to wait a considerable amount of time to obtain a lock, even if
a deadlock is not involved. a deadlock is not involved.
...@@ -872,7 +872,6 @@ method to add new database types or overwrite existing ones. ...@@ -872,7 +872,6 @@ method to add new database types or overwrite existing ones.
Database vendors that allow to define custom types like PostgreSql Database vendors that allow to define custom types like PostgreSql
can help to overcome this issue. can help to overcome this issue.
Custom Mapping Types Custom Mapping Types
-------------------- --------------------
...@@ -956,7 +955,6 @@ Then you override the ``convertToPhpValueSQL`` and ...@@ -956,7 +955,6 @@ Then you override the ``convertToPhpValueSQL`` and
return 'MyFunction('.$sqlExpr.')'; return 'MyFunction('.$sqlExpr.')';
} }
Now we have to register this type with the Doctrine Type system and Now we have to register this type with the Doctrine Type system and
hook it into the database platform: hook it into the database platform:
......
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