Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pborreli committed Jul 17, 2012
1 parent 54633f1 commit 4866580
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cookbook/user-contributed-behaviors.markdown
Expand Up @@ -45,7 +45,7 @@ Here is a list of Propel behaviors contributed by users. Feel free to use them o

* [sfPropelORMRatableBehaviorPlugin](https://bitbucket.org/matteosister/sfpropelormratablebehaviorplugin) A behavior for propel 1.6 and symfony 1.4.x to rate your objects.

* [sfContextBehavior](https://github.com/Carpe-Hora/sfContextBehavior) A behavior for propel 1.6 and symfony 1.x redering object context aware.
* [sfContextBehavior](https://github.com/Carpe-Hora/sfContextBehavior) A behavior for propel 1.6 and symfony 1.x rendering object context aware.

* [ncPropelChangeLogBehaviorPlugin](https://github.com/CraftyShadow/ncPropelChangeLogBehaviorPlugin) Provides a Behavior for Propel objects that allows you to track any changes made to them.

Expand Down
2 changes: 1 addition & 1 deletion cookbook/using-mssql-server.markdown
Expand Up @@ -97,7 +97,7 @@ propel.database.url = sybase:host=localhost:1433;dbname=propel

### pdo_mssql ###

When built against MS SQL Server dblib the driver will be called `pdo_mssql`. It is not recommeneded to use the `pdo_mssql` driver because it strips blobs of single quotes when retreiving from the database and will not return blobs or clobs longer that 8192 characters. The dsn differs from `pdo_sybase` in that it uses a comma between the server and port number instead of a colon and mssql instead of sybase for the driver name.
When built against MS SQL Server dblib the driver will be called `pdo_mssql`. It is not recommended to use the `pdo_mssql` driver because it strips blobs of single quotes when retrieving from the database and will not return blobs or clobs longer that 8192 characters. The dsn differs from `pdo_sybase` in that it uses a comma between the server and port number instead of a colon and mssql instead of sybase for the driver name.

Sample dsn's for `pdo_mssql`:

Expand Down
2 changes: 1 addition & 1 deletion cookbook/using-sql-schemas.markdown
Expand Up @@ -54,7 +54,7 @@ You can create foreign keys between tables assigned to different schemas, provid

## Schemas in Generated SQL ##

When generating the SQL for table creation, Propel correclty adds the schema prefix (example for MySQL):
When generating the SQL for table creation, Propel correctly adds the schema prefix (example for MySQL):

{% highlight sql %}
CREATE TABLE `bookstore`.`book`
Expand Down
6 changes: 3 additions & 3 deletions documentation/05-validators.markdown
Expand Up @@ -44,7 +44,7 @@ if ($objUser->validate()) {
}
{% endhighlight %}

`validate()` returns a boolean. If the validation failed, you can access the array `ValidationFailed` objects by way of the `getValidationFailures()` method. Each `ValidationFailed` instance gives access to the column, the messagen and the validator that caused the failure.
`validate()` returns a boolean. If the validation failed, you can access the array `ValidationFailed` objects by way of the `getValidationFailures()` method. Each `ValidationFailed` instance gives access to the column, the message and the validator that caused the failure.

## Core Validators ##

Expand All @@ -56,7 +56,7 @@ The `MatchValidator` is used to run a regular expression of choice against the c

{% highlight xml %}
<validator column="username">
<!-- allow strings that match the email adress pattern -->
<!-- allow strings that match the email address pattern -->
<rule
name="match"
value="/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/"
Expand All @@ -81,7 +81,7 @@ Opposite of `MatchValidator`, this validator returns false if the regex returns

### MaxLengthValidator ###

When you want to limit the size of the string to be inserted in a column, use the `MaxLengthValidator`. Internally, it uses `strlen()` to get the length of the string. For instance, some database completely ignore the lentgh of `LONGVARCHAR` columns; you can enforce it using a validator:
When you want to limit the size of the string to be inserted in a column, use the `MaxLengthValidator`. Internally, it uses `strlen()` to get the length of the string. For instance, some database completely ignore the length of `LONGVARCHAR` columns; you can enforce it using a validator:

{% highlight xml %}
<column name="comment" type="LONGVARCHAR" required="true" />
Expand Down
6 changes: 3 additions & 3 deletions documentation/06-transactions.markdown
Expand Up @@ -41,7 +41,7 @@ public function transferMoney($fromAccountNumber, $toAccountNumber, $amount)
}
{% endhighlight %}

The transaction statements are `beginTransaction()`, `commit()` and `rollback()`, which are methods of the PDO connection object. Transaction methods are typically used inside a `try/catch` block. The exception is rethrown after rolling back the transaction: That ensures that the user knows that something wrong happenned.
The transaction statements are `beginTransaction()`, `commit()` and `rollback()`, which are methods of the PDO connection object. Transaction methods are typically used inside a `try/catch` block. The exception is rethrown after rolling back the transaction: That ensures that the user knows that something wrong happened.

In this example, if something wrong happens while saving either one of the two accounts, an `Exception` is thrown, and the whole operation is rolled back. That means that the transfer is cancelled, with an insurance that the money hasn't vanished (that's the A in ACID, which stands for "Atomicity"). If both account modifications work as expected, the whole transaction is committed, meaning that the data changes enclosed in the transaction are persisted in the database.

Expand Down Expand Up @@ -259,7 +259,7 @@ $fromAccount->setValue($fromAccount->getValue() - $amount);
$fromAccount->save($con);
{% endhighlight %}

The same code works without explicitely passing the connection object, because Propel knows how to get the right connection from a Model:
The same code works without explicitly passing the connection object, because Propel knows how to get the right connection from a Model:

{% highlight php %}
<?php
Expand All @@ -268,7 +268,7 @@ $fromAccount->setValue($fromAccount->getValue() - $amount);
$fromAccount->save();
{% endhighlight %}

However, it's a good practice to pass the connection explicitely, and for three reasons:
However, it's a good practice to pass the connection explicitly, and for three reasons:

* Propel doesn't need to look for a connection object, and this results in a tiny boost in performance.
* You can use a specific connection, which is required in distributed (master/slave) environments, in order to distinguish read and write operations.
Expand Down
4 changes: 2 additions & 2 deletions documentation/07-behaviors.markdown
Expand Up @@ -114,7 +114,7 @@ Propel offers three ways to achieve the refactoring of the common behavior. The

Behaviors are special objects that use events called during the build process to enhance the generated model classes. Behaviors can add attributes and methods to both the Peer and model classes, they can modify the course of some of the generated methods, and they can even modify the structure of a database by adding columns or tables.

For instance, Propel bundles a behavior called `timestampable`, which does exatcly the same thing as described above. But instead of adding columns and methods by hand, all you have to do is to declare it in a `<behavior>` tag in your `schema.xml`, as follows:
For instance, Propel bundles a behavior called `timestampable`, which does exactly the same thing as described above. But instead of adding columns and methods by hand, all you have to do is to declare it in a `<behavior>` tag in your `schema.xml`, as follows:

{% highlight xml %}
<table name="book">
Expand Down Expand Up @@ -190,7 +190,7 @@ As a Propel behavior can be packaged into a single class, behaviors are quite ea
# ----------------------------------

propel.behavior.timestampable.class = propel.engine.behavior.timestampable.TimestampableBehavior
# Add your custom behavior pathes here
# Add your custom behavior paths here
propel.behavior.formidable.class = path.to.FormidableBehavior
{% endhighlight %}

Expand Down
2 changes: 1 addition & 1 deletion documentation/09-inheritance.markdown
Expand Up @@ -120,7 +120,7 @@ If you wish to enforce using subclasses of an entity, you may declare a table "a
...
{% endhighlight %}

That way users will only be able to instanciate `Essay` or `Comic` books, but not `Book`.
That way users will only be able to instantiate `Essay` or `Comic` books, but not `Book`.

## Class Table Inheritance ##

Expand Down
4 changes: 2 additions & 2 deletions documentation/whats-new.markdown
Expand Up @@ -35,7 +35,7 @@ Starting with Propel 1.6, the `sql`-`insert-sql` sequence is replaced by the `di

Migrations are a fantastic way to work on complex projects with always evolving models ; they are also a great tool for team work, since migration classes can be shared among all developers. That way, when a developer adds a table to the model, a second developer just needs to run the related migration to have the table added to the table.

Propel migrations can also be executed incrementally - the new `up` and `down` tasks are there for that. And when you're lost in migration, call the `status` task to chack which migrations were already executed, and which ones should be executed to update the database structure.
Propel migrations can also be executed incrementally - the new `up` and `down` tasks are there for that. And when you're lost in migration, call the `status` task to check which migrations were already executed, and which ones should be executed to update the database structure.

The Propel documentation offers [an entire chapter on Migrations](10-migrations.html) to explain how to use them and how they work.

Expand Down Expand Up @@ -343,7 +343,7 @@ echo $publisher;
// <?xml version="1.0" encoding="UTF-8"?>
// <data>
// <Id></Id>
// <Name><![CDATA[Peguin]]></Name>
// <Name><![CDATA[Penguin]]></Name>
// </data>
{% endhighlight %}

Expand Down
2 changes: 1 addition & 1 deletion index.markdown
Expand Up @@ -51,7 +51,7 @@ Propel is built for developers who need to keep control of their code:
* Propel can get out of your way for when you need custom queries or hyper-optimized transactions.
* If you need to change your RDBMS in the course of the project, rebuild your model and you're ready to go. Propel supports MySQL, PostgreSQL, SQLite, MSSQL, and Oracle.
* The code generated by Propel is well commented, IDE-friendly and easy to use.
* The Propel project started in 2005, and already powers thousands of websites. Throughly documented, backed by many tutorials across the web, it also benefits from an enthusiast community that provides rapid support for both beginner and hardcore developers.
* The Propel project started in 2005, and already powers thousands of websites. Thoroughly documented, backed by many tutorials across the web, it also benefits from an enthusiast community that provides rapid support for both beginner and hardcore developers.

Propel is released under the [MIT license](http://www.propelorm.org/download#license). It's free to use, even in commercial applications.

Expand Down
4 changes: 2 additions & 2 deletions reference/active-record.markdown
Expand Up @@ -82,8 +82,8 @@ abstract class BaseBook extends BaseObject implements Persistent
// BaseObject and Persistent are classes bundled by Propel
// Do not alter the code of the Base- classes, as your modifications will be overriden
// each time you rebuild the model. Instead, add your cutom code to the stub slass
// Do not alter the code of the Base- classes, as your modifications will be overridden
// each time you rebuild the model. Instead, add your custom code to the stub class
class Book extends BaseBook
{
public function getCapitalTitle()
Expand Down
6 changes: 3 additions & 3 deletions reference/model-criteria.markdown
Expand Up @@ -43,7 +43,7 @@ $stmt->bind(':p1', time() - 30 * 24 * 60 * 60, PDO::PARAM_INT);
$res = $stmt->execute();
{% endhighlight %}

The final `find()` doesn't just execute the SQL query above, it also instanciates `Book` objects and populates them with the results of the query. Eventually, it returns a `PropelCollection` object with these `Book` objects inside. For the sake of clarity, you can consider this collection object as an array. In fact, you can use it as if it were a true PHP array and iterate over the result list the usual way:
The final `find()` doesn't just execute the SQL query above, it also instantiates `Book` objects and populates them with the results of the query. Eventually, it returns a `PropelCollection` object with these `Book` objects inside. For the sake of clarity, you can consider this collection object as an array. In fact, you can use it as if it were a true PHP array and iterate over the result list the usual way:

{% highlight php %}
<?php
Expand Down Expand Up @@ -940,7 +940,7 @@ $books = $query
->find();
{% endhighlight %}

The `ModelCriteria` class offers a neat way to keep your code to a minimum in such occasions. It provides `_if()` and `_endif()` methods allowing for inline conditions. Using thses methods, the previous query can be written as follows:
The `ModelCriteria` class offers a neat way to keep your code to a minimum in such occasions. It provides `_if()` and `_endif()` methods allowing for inline conditions. Using theses methods, the previous query can be written as follows:

{% highlight php %}
<?php
Expand Down Expand Up @@ -1246,7 +1246,7 @@ $q = new frontendBookQuery();
$books = $q->find();
{% endhighlight %}

>**Tip**<br />Due to late static binding issues in PHP 5.2, you cannot use the `create()` factory on an inherited query - unless you override it yoursel in the descendant class. Alternatively, Propel offers a global query factory named `PropelQuery`:
>**Tip**<br />Due to late static binding issues in PHP 5.2, you cannot use the `create()` factory on an inherited query - unless you override it yourself in the descendant class. Alternatively, Propel offers a global query factory named `PropelQuery`:

{% highlight php %}
<?php
Expand Down

0 comments on commit 4866580

Please sign in to comment.