Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor fixes

  • Loading branch information...
commit 7c6cab5a795c502fea8c950ed37bd1245f662952 1 parent 79f0ddc
@shama shama authored
View
4 en/appendices/cakephp-development-process.rst
@@ -18,12 +18,12 @@ We currently maintain 4 versions of CakePHP.
branches once a stable release point has been reached. Maintenance
branches are where all bugfixes are committed before making their way
into a stable release. Maintenance branches have the same name as the
- major version they are for. eg. *1.2*. If you are using a stable
+ major version they are for example *1.2*. If you are using a stable
release and need fixes that haven't made their way into a stable
release check here.
- **development branches** : Development branches contain leading edge
fixes and features. They are named after the version number they are
- for. eg. *1.3*. Once development branches have reached a stable
+ for example *1.3*. Once development branches have reached a stable
release point they become maintenance branches, and no further new
features are introduced unless absolutely necessary.
- **feature branches** : Feature branches contain unfinished or
View
2  en/appendices/migrating-from-cakephp-1-2-to-1-3.rst
@@ -603,7 +603,7 @@ new features in the FormHelper.
- ``flash()`` no longer auto echos. You must add an
- ``echo $session->flash();`` to your session->flash() calls. flash()
+ ``echo $session->flash();`` to your session->flash() calls. ``flash()``
was the only helper method that auto outputted, and was changed to
create consistency in helper methods.
View
4 en/appendices/new-features-in-cakephp-1-3.rst
@@ -209,7 +209,7 @@ tableParameters to set a variety of MySQL specific settings.
- ``encoding`` Control the encoding used for tables.
In addition to tableParameters MySQL dbo's implement
-``fieldParameters``. fieldParameters allow you to control MySQL
+``fieldParameters``. ``fieldParameters`` allow you to control MySQL
specific settings per column.
@@ -343,7 +343,7 @@ Library classes
**Inflector**
You can now globally customize the default transliteration map used
-in Inflector::slug using Inflector::rules. eg.
+in Inflector::slug using Inflector::rules. Example
``Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe'))``
The Inflector now also internally caches all data passed to it for
View
14 en/cakephp-overview/understanding-model-view-controller.rst
@@ -7,23 +7,23 @@ software design pattern. Programming using MVC separates your
application into three main parts:
The Model layer
-================
+===============
The Model layer represents the part of your application that
-implements the business logic. This means that it is responsible
-for retrieving data, converting it into meaningful concepts for your
-application, as well as processing, validating, associating and any
-other task relative to handling this data.
+implements the business logic. It is responsible for retrieving data and
+converting it into meaningful concepts for your application. This includes
+processing, validating, associating or other tasks related to handling data.
At a first glance, Model objects can be looked at as the first layer
-of interaction with any database you might be using for your application.
+of interaction with any database you might be using for your application.
But in general they stand for the major concepts around which you
implement your application.
In the case of a social network, the Model layer would take care of
tasks such as Saving the user data, saving friends associations, storing
and retrieving user photos, finding new friends for suggestions, etc.
-While the model objects can be thought as "Friend", "User", "Comment", "Photo"
+While the model objects can be thought as "Friend", "User", "Comment", or
+"Photo".
The View layer
==============
View
2  en/core-utility-libraries/app.rst
@@ -292,7 +292,7 @@ Overriding classes in CakePHP
=============================
You can override almost every class in the framework, exceptions are the
-:php:class:`App` and :php:class:`Configure` classes. whenever you like to
+:php:class:`App` and :php:class:`Configure` classes. Whenever you like to
perform such overriding, just add your class to your app/Lib folder mimicking
the internal structure of the framework. Some examples to follow
View
2  en/core-utility-libraries/email.rst
@@ -175,7 +175,7 @@ other configurations.
.. note::
- The values of above keys using Email or array, like from, to, cc etc. will be passed
+ The values of above keys using Email or array, like from, to, cc, etc will be passed
as first parameter of corresponding methods. The equivalent for:
``CakeEmail::from('my@example.com', 'My Site')``
would be defined as ``'from' => array('my@example.com' => 'My Site')`` in your config
View
2  en/development/testing.rst
@@ -75,7 +75,7 @@ Congratulations, you are now ready to start writing tests!
Test Case Conventions
=====================
-Like most things in CakePHP, test cases have some conventions. concerning
+Like most things in CakePHP, test cases have some conventions. Concerning
tests:
#. PHP files containing tests should be in your
View
2  en/models/associations-linking-models-together.rst
@@ -62,7 +62,7 @@ In the above example, the first instance of the word 'Recipe' is
what is termed an 'Alias'. This is an identifier for the
relationship and can be anything you choose. Usually, you will
choose the same name as the class that it references. However,
-**aliases for each model must be unique app wide**. E.g. it is
+**aliases for each model must be unique app wide**. For example it is
appropriate to have::
class User extends AppModel {
View
24 en/models/data-validation/validating-data-from-the-controller.rst
@@ -8,17 +8,13 @@ information to the user before actually saving the data to the
database. Validating data requires a slightly different process
than just saving the data.
-First, set the data to the model:
-
-::
+First, set the data to the model::
$this->ModelName->set($this->request->data);
Then, to check if the data validates, use the validates method of
the model, which will return true if it validates and false if it
-doesn't:
-
-::
+doesn't::
if ($this->ModelName->validates()) {
// it validated logic
@@ -33,9 +29,7 @@ User model with fields for first\_name, last\_name, email and
password. In this instance when creating or editing a user you
would want to validate all 4 field rules. Yet when a user logs in
you would validate just email and password rules. To do this you
-can pass an options array specifying the fields to validate. e.g.
-
-::
+can pass an options array specifying the fields to validate::
if ($this->User->validates(array('fieldList' => array('email', 'password')))) {
// valid
@@ -45,9 +39,7 @@ can pass an options array specifying the fields to validate. e.g.
The validates method invokes the invalidFields method which
populates the validationErrors property of the model. The
-invalidFields method also returns that data as the result.
-
-::
+invalidFields method also returns that data as the result::
$errors = $this->ModelName->invalidFields(); // contains validationErrors array
@@ -64,9 +56,7 @@ calling save as save will automatically validate the data before
actually saving.
To validate multiple models, the following approach should be
-used:
-
-::
+used::
if ($this->ModelName->saveAll($this->request->data, array('validate' => 'only'))) {
// validates
@@ -75,9 +65,7 @@ used:
}
If you have validated data before save, you can turn off validation
-to avoid second check.
-
-::
+to avoid second check::
if ($this->ModelName->saveAll($this->request->data, array('validate' => false))) {
// saving without validation
View
2  en/plugins.rst
@@ -32,7 +32,7 @@ You can either load them one by one or all of them in a single call::
loadAll loads all plugins available, while allowing you to set certain
-settings for specific plugins. load() works similarly, but only loads the
+settings for specific plugins. ``load()`` works similarly, but only loads the
plugins you explicitly specify.
Plugin configuration
View
2  en/tutorials-and-examples/blog/blog.rst
@@ -63,7 +63,7 @@ structure works: check out
Creating the Blog Database
==========================
-Next, let's set up the underlying database for our blog. if you
+Next, let's set up the underlying database for our blog. If you
haven't already done so, create an empty database for use in this
tutorial, with a name of your choice. Right now, we'll just create
a single table to store our posts. We'll also throw in a few posts
View
9 en/tutorials-and-examples/blog/part-two.rst
@@ -370,11 +370,12 @@ along with the closing form tag. Again, refer to
Now let's go back and update our ``/app/View/Posts/index.ctp``
view to include a new "Add Post" link. Before the ``<table>``, add
-the following line:
+the following line::
-.. code-block:: php
-
- <?php echo $this->Html->link('Add Post', array('controller' => 'posts', 'action' => 'add')); ?>
+ <?php echo $this->Html->link(
+ 'Add Post',
+ array('controller' => 'posts', 'action' => 'add')
+ ); ?>
You may be wondering: how do I tell CakePHP about my validation
requirements? Validation rules are defined in the model. Let's look
Please sign in to comment.
Something went wrong with that request. Please try again.