Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 30, 2018. It is now read-only.

Commit f61d417

Browse files
committed
Merge pull request #3 from bantu/master
Various minor improvements such as typo and grammar fixes etc.
2 parents 84307e0 + 9c195e3 commit f61d417

9 files changed

+39
-39
lines changed

en/reference/architecture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ features a platform supports. The
6060
denominator of what a database platform has to publish to the
6161
userland, to be fully supportable by Doctrine. This includes the
6262
SchemaTool, Transaction Isolation and many other features. The
63-
Database platform for MySQL for example can be used by all 3 mysql
63+
Database platform for MySQL for example can be used by all 3 MySQL
6464
extensions, PDO, Mysqli and ext/mysql.
6565

6666
Logging

en/reference/configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ interfaces to use. It can be configured in one of three ways:
4848
extension.
4949
**Note that this driver caused problems in our tests. Prefer the oci8 driver if possible.**
5050
- ``pdo_sqlsrv``: An MSSQL driver that uses pdo\_sqlsrv PDO
51-
- ``oci8``:\` An Oracle driver that uses the oci8 PHP extension.
51+
- ``oci8``: An Oracle driver that uses the oci8 PHP extension.
5252

5353
- ``driverClass``: Specifies a custom driver implementation if no
5454
'driver' is specified. This allows the use of custom drivers that
@@ -60,7 +60,7 @@ Wrapper Class
6060

6161
By default a ``Doctrine\DBAL\Connection`` is wrapped around a
6262
driver ``Connection``. The ``wrapperClass`` option allows to
63-
specify a custom wrapper implementation to use, however, custom
63+
specify a custom wrapper implementation to use, however, a custom
6464
wrapper class must be a subclass of ``Doctrine\DBAL\Connection``.
6565

6666
Connection Details
@@ -157,7 +157,7 @@ Custom Driver Options
157157
~~~~~~~~~~~~~~~~~~~~~
158158

159159
The ``driverOptions`` option allows to pass arbitrary options
160-
through to the driver. This is equivalent to the 4th argument of
160+
through to the driver. This is equivalent to the fourth argument of
161161
the `PDO constructor <http://php.net/manual/en/pdo.construct.php>`_.
162162

163163

en/reference/data-retrieval-and-manipulation.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ Data Retrieval And Manipulation
22
===============================
33

44
Doctrine DBAL follows the PDO API very closely. If you have worked with PDO
5-
before you will get to know Doctrine DBAL very quickly. On top of API provided
5+
before you will get to know Doctrine DBAL very quickly. On top of the API provided
66
by PDO there are tons of convenience functions in Doctrine DBAL.
77

88
Data Retrieval
99
--------------
1010

11-
Using a database implies retrieval of data. Its the primary use-case of a database.
11+
Using a database implies retrieval of data. It is the primary use-case of a database.
1212
For this purpose each database vendor exposes a Client API that can be integrated into
13-
all the programming languages. PHP has a generic abstraction layer for this
14-
kind of Client API called PDO (PHP Data Objects). However because of disagreements
13+
programming languages. PHP has a generic abstraction layer for this
14+
kind of API called PDO (PHP Data Objects). However because of disagreements
1515
between the PHP community there are often native extensions for each database
1616
vendor that are much more maintained (OCI8 for example).
1717

1818
Doctrine DBAL API builds on top of PDO and integrates native extensions by
19-
wrapping them into the PDO API aswell. If you already have an open connection
19+
wrapping them into the PDO API as well. If you already have an open connection
2020
through the ``Doctrine\DBAL\DriverManager::getConnection()`` method you
2121
can start using this API for data retrieval easily.
2222

@@ -33,7 +33,7 @@ connection:
3333
$sql = "SELECT * FROM articles";
3434
$stmt = $conn->query($sql); // Simple, but has several drawbacks
3535
36-
The query method executes and the sql and returns a database statement object.
36+
The query method executes the SQL and returns a database statement object.
3737
A database statement object can be iterated to retrieve all the rows that matched
3838
the query until there are no more rows:
3939

@@ -49,15 +49,15 @@ The query method is the most simple one for fetching data, but it also has
4949
several drawbacks:
5050

5151
- There is no way to add dynamic parameters to the SQL query without modifying
52-
the sql query (``$sql``) itself. This can easily lead to a category of security
52+
``$sql`` itself. This can easily lead to a category of security
5353
holes called **SQL injection**, where a third party can modify the SQL executed
5454
and even execute their own queries through clever exploiting of the security hole.
5555
- **Quoting** dynamic parameters for an SQL query is tedious work and requires lots
5656
of use of the ``Doctrine\DBAL\Connection#quote()`` method, which makes the
5757
original SQL query hard to read/understand.
58-
- Databases optimize the SQL query to be executed, using the query method
58+
- Databases optimize SQL queries before they are executed. Using the query method
5959
you will trigger the optimization process over and over again, although
60-
it could re-use this information easily using a technique called **prepared statement**.
60+
it could re-use this information easily using a technique called **prepared statements**.
6161

6262
This three arguments and some more technical details hopefully convinced you to investigate
6363
prepared statements for accessing your database.
@@ -76,8 +76,8 @@ every value passed into the query using ``mysql_real_escape_string()`` to avoid
7676
$rs = mysql_query($sql);
7777
7878
If you start adding more and more parameters to a query (for example in UPDATE or INSERT statements)
79-
this approach might lead to complex to maintain sql queries. The reason is simple, the actual
80-
sql query is not separated clearly from the input parameters. Prepared statements separate
79+
this approach might lead to complex to maintain SQL queries. The reason is simple, the actual
80+
SQL query is not clearly separated from the input parameters. Prepared statements separate
8181
these two concepts by requiring the developer to add **placeholders** to the SQL query (prepare) which
8282
are then replaced by their actual values in a second step (execute).
8383

@@ -94,7 +94,7 @@ are then replaced by their actual values in a second step (execute).
9494
Placeholders in prepared statements are either simple positional question marks (?) or named labels starting with
9595
a double-colon (:name1). You cannot mix the positional and the named approach. The approach
9696
using question marks is called positional, because the values are bound in order from left to right
97-
to any question mark found in the previously prepared sql query. That is why you specify the
97+
to any question mark found in the previously prepared SQL query. That is why you specify the
9898
position of the variable to bind into the ``bindValue()`` method:
9999

100100
.. code-block:: php
@@ -124,7 +124,7 @@ The following section describes the API of Doctrine DBAL with regard to prepared
124124

125125
.. note::
126126

127-
The support for positional and named prepared statements varies between the different
127+
Support for positional and named prepared statements varies between the different
128128
database extensions. PDO implements its own client side parser so that both approaches
129129
are feasible for all PDO drivers. OCI8/Oracle only supports named parameters, but
130130
Doctrine implements a client side parser to allow positional parameters also.
@@ -137,13 +137,13 @@ use prepared statements:
137137

138138
- ``prepare($sql)`` - Create a prepared statement of the type ``Doctrine\DBAL\Statement``.
139139
Using this method is preferred if you want to re-use the statement to execute several
140-
queries with the same sql statement only with different parameters.
140+
queries with the same SQL statement only with different parameters.
141141
- ``executeQuery($sql, $params, $types)`` - Create a prepared statement for the passed
142-
sql query, bind the given params with their binding types and execute the query.
142+
SQL query, bind the given params with their binding types and execute the query.
143143
This method returns the executed prepared statement for iteration and is useful
144144
for SELECT statements.
145145
- ``executeUpdate($sql, $params, $types)`` - Create a prepared statement for the passed
146-
sql query, bind the given params with their binding types and execute the query.
146+
SQL query, bind the given params with their binding types and execute the query.
147147
This method returns the number of affected rows by the executed query and is useful
148148
for UPDATE, DELETE and INSERT statements.
149149

@@ -173,7 +173,7 @@ If you find it tedious to write all the prepared statement code you can alternat
173173
the ``Doctrine\DBAL\Connection#executeQuery()`` and ``Doctrine\DBAL\Connection#executeUpdate()``
174174
methods. See the API section below on details how to use them.
175175

176-
Additionally there are lots of convenience methods for data-retrieval and mainpulation
176+
Additionally there are lots of convenience methods for data-retrieval and manipulation
177177
on the Connection, which are all described in the API section below.
178178

179179
Binding Types
@@ -191,7 +191,7 @@ any of the parameter binding methods but a string, Doctrine DBAL will
191191
ask the type abstraction layer to convert the passed value from
192192
its PHP to a database representation. This way you can pass ``\DateTime``
193193
instances to a prepared statement and have Doctrine convert them
194-
to the apropriate vendors database format:
194+
to the appropriate vendors database format:
195195

196196
.. code-block:: php
197197
@@ -261,9 +261,9 @@ the SQL and flattens the specified values into the set of parameters. Consider o
261261
array(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
262262
);
263263
264-
The sql statement passed to ``Connection#executeQuery`` is not the one actually passed to the
264+
The SQL statement passed to ``Connection#executeQuery`` is not the one actually passed to the
265265
database. It is internally rewritten to look like the following explicit code that could
266-
be specified aswell:
266+
be specified as well:
267267

268268
.. code-block:: php
269269
@@ -293,7 +293,7 @@ them.
293293
prepare()
294294
~~~~~~~~~
295295

296-
Prepare a given sql statement and return the
296+
Prepare a given SQL statement and return the
297297
``\Doctrine\DBAL\Driver\Statement`` instance:
298298

299299
.. code-block:: php
@@ -315,7 +315,7 @@ Prepare a given sql statement and return the
315315
executeUpdate()
316316
~~~~~~~~~~~~~~~
317317

318-
Executes a prepared statement with the given sql and parameters and
318+
Executes a prepared statement with the given SQL and parameters and
319319
returns the affected rows count:
320320

321321
.. code-block:: php
@@ -332,7 +332,7 @@ parameters and expected database values. See the
332332
executeQuery()
333333
~~~~~~~~~~~~~~
334334

335-
Creates a prepared statement for the given sql and passes the
335+
Creates a prepared statement for the given SQL and passes the
336336
parameters to the execute method, then returning the statement:
337337

338338
.. code-block:: php

en/reference/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Introduction
22
============
33

44
The Doctrine database abstraction & access layer (DBAL) offers a
5-
leightweight and thin runtime layer around a PDO-like API and a lot
5+
lightweight and thin runtime layer around a PDO-like API and a lot
66
of additional, horizontal features like database schema
77
introspection and manipulation through an OO API.
88

en/reference/portability.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Database Platform
6969
-----------------
7070

7171
Using the database platform you can generate bits of SQL for you, specifically
72-
in the area of sql functions to achieve portability. You should have a look
72+
in the area of SQL functions to achieve portability. You should have a look
7373
at all the different methods that the platforms allow you to access.
7474

7575
Keyword Lists

en/reference/schema-manager.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,15 @@ table:
212212
$toSchema->dropTable('user');
213213
214214
Now we can compare the two schema instances in order to calculate
215-
the differences between them and return the sql required to make
215+
the differences between them and return the SQL required to make
216216
the changes on the database:
217217

218218
.. code-block:: php
219219
220220
<?php
221221
$sql = $fromSchema->getMigrateToSql($toSchema, $conn->getDatabasePlatform());
222222
223-
The ``$sql`` array should give you a sql query to drop the user
223+
The ``$sql`` array should give you a SQL query to drop the user
224224
table:
225225

226226
.. code-block:: php

en/reference/schema-representation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ example shows:
4040
4141
Now if you want to compare this schema with another schema, you can
4242
use the ``Comparator`` class to get instances of ``SchemaDiff``,
43-
``TableDiff`` and ``ColumnDiff``, aswell as information about other
43+
``TableDiff`` and ``ColumnDiff``, as well as information about other
4444
foreign key, sequence and index changes.
4545

4646
.. code-block:: php

en/reference/transactions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ is functionally equivalent to the previous one:
3636
The ``Doctrine\DBAL\Connection`` also has methods to control the
3737
transaction isolation level as supported by the underlying
3838
database. ``Connection#setTransactionIsolation($level)`` and
39-
Connection#getTransactionIsolation() can be used for that purpose.
39+
``Connection#getTransactionIsolation()`` can be used for that purpose.
4040
The possible isolation levels are represented by the following
4141
constants:
4242

@@ -60,9 +60,9 @@ transactions, or rather propagating transaction control up the call
6060
stack. For that purpose, the ``Connection`` class keeps an internal
6161
counter that represents the nesting level and is
6262
increased/decreased as ``beginTransaction()``, ``commit()`` and
63-
``rollback()`` are invoked. ``beginTransaction()`` increases the
63+
``rollback()`` are invoked. ``beginTransaction()`` increases the
6464
nesting level whilst
65-
``commit()`` and``rollback()``decrease the nesting level. The nesting level starts at 0. Whenever the nesting level transitions from 0 to 1,``beginTransaction()``is invoked on the underlying driver connection and whenever the nesting level transitions from 1 to 0,``commit()``or``rollback()``is invoked on the underlying driver, depending on whether the transition was caused by``Connection#commit()``or``Connection#rollback()\`.
65+
``commit()`` and ``rollback()`` decrease the nesting level. The nesting level starts at 0. Whenever the nesting level transitions from 0 to 1, ``beginTransaction()`` is invoked on the underlying driver connection and whenever the nesting level transitions from 1 to 0, ``commit()`` or ``rollback()`` is invoked on the underlying driver, depending on whether the transition was caused by ``Connection#commit()`` or ``Connection#rollback()``.
6666

6767
What this means is that transaction control is basically passed to
6868
code higher up in the call stack and the inner transaction block is
@@ -127,7 +127,7 @@ wider scope and the control is handed to the outer scope.
127127
.. note::
128128

129129
The transaction nesting described here is a debated
130-
feature that has it's critics. Form your own opinion. We recommend
130+
feature that has its critics. Form your own opinion. We recommend
131131
avoiding nesting transaction blocks when possible, and most of the
132132
time, it is possible. Transaction control should mostly be left to
133133
a service layer and not be handled in data access objects or
@@ -138,7 +138,7 @@ wider scope and the control is handed to the outer scope.
138138
Directly invoking ``PDO#beginTransaction()``,
139139
``PDO#commit()`` or ``PDO#rollback()`` or the corresponding methods
140140
on the particular ``Doctrine\DBAL\Driver\Connection`` instance in
141-
use bybasses the transparent transaction nesting that is provided
141+
use bypasses the transparent transaction nesting that is provided
142142
by ``Doctrine\DBAL\Connection`` and can therefore corrupt the
143143
nesting level, causing errors with broken transaction boundaries
144144
that may be hard to debug.

en/reference/types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Besides abstraction of SQL one needs a translation between database
55
and PHP data-types to implement database independent applications.
66
Doctrine 2 has a type translation system baked in that supports the
77
conversion from and to PHP values from any database platform,
8-
aswell as platform independent SQL generation for any Doctrine
8+
as well as platform independent SQL generation for any Doctrine
99
Type.
1010

1111
Using the ORM you generally don't need to know about the Type
12-
system. This is unless you wan't to make use of database vendor
12+
system. This is unless you want to make use of database vendor
1313
specific database types not included in Doctrine 2. The following
1414
PHP Types are abstracted across all the supported database
1515
vendors:

0 commit comments

Comments
 (0)