Skip to content

Commit 57f879d

Browse files
author
Fabrice Bernhard
committed
Merge branch 'master' of git://github.com/symfony/symfony-docs
Conflicts: guides/symfony1.rst
2 parents 32688fa + f1de5e9 commit 57f879d

30 files changed

+1027
-506
lines changed

guides/cache/http.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ header when none is set by the developer by following these rules:
5858
* If ``Cache-Control`` is empty, its value is set to ``private, max-age=0,
5959
must-revalidate``;
6060

61-
* But if at least one ``Cache-Control`` directive is set, and no 'public' or
61+
* But if at least one ``Cache-Control`` directive is set, and no ``public`` or
6262
``private`` directives have been explicitly added, Symfony2 adds the
6363
``private`` directive automatically (except when ``s-maxage`` is set).
6464

@@ -183,7 +183,7 @@ which the response is considered stale." The ``Expires`` header can be set
183183
with the ``setExpires()`` Response method. It takes a ``DateTime`` instance as
184184
an argument::
185185

186-
$date = new DateTime();
186+
$date = new \DateTime();
187187
$date->modify('+600 seconds');
188188

189189
$response->setExpires($date);
@@ -632,7 +632,7 @@ route:
632632
633633
# app/config/routing.yml
634634
_internal:
635-
resource: FrameworkBundle/Resources/config/routing/internal.xml
635+
resource: @FrameworkBundle/Resources/config/routing/internal.xml
636636
prefix: /_internal
637637
638638
.. code-block:: xml

guides/doctrine/migrations/overview.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ status of a bundle migrations you can run the ``status`` command:
3131

3232
.. code-block:: bash
3333
34-
$ php app/console doctrine:migrations:status --bundle="Application\HelloBundle"
34+
$ php app/console doctrine:migrations:status --bundle="Sensio\HelloBundle"
3535
3636
== Configuration
3737
3838
>> Name: HelloBundle Migrations
3939
>> Configuration Source: manually configured
4040
>> Version Table Name: hello_bundle_migration_versions
41-
>> Migrations Namespace: Application\HelloBundle\DoctrineMigrations
41+
>> Migrations Namespace: Sensio\HelloBundle\DoctrineMigrations
4242
>> Migrations Directory: /path/to/symfony-sandbox/src/Bundle/HelloBundle/DoctrineMigrations
4343
>> Current Version: 0
4444
>> Latest Version: 0
@@ -51,13 +51,13 @@ class:
5151

5252
.. code-block:: bash
5353
54-
$ php app/console doctrine:migrations:generate --bundle="Application\HelloBundle"
54+
$ php app/console doctrine:migrations:generate --bundle="Sensio\HelloBundle"
5555
Generated new migration class to "/path/to/symfony-sandbox/src/Bundle/HelloBundle/DoctrineMigrations/Version20100621140655.php"
5656
5757
Have a look at the newly generated migration class and you will see something
5858
like the following::
5959

60-
namespace Application\HelloBundle\DoctrineMigrations;
60+
namespace Sensio\HelloBundle\DoctrineMigrations;
6161

6262
use Doctrine\DBAL\Migrations\AbstractMigration,
6363
Doctrine\DBAL\Schema\Schema;
@@ -80,15 +80,15 @@ that you have one new migration to execute:
8080

8181
.. code-block:: bash
8282
83-
$ php app/console doctrine:migrations:status --bundle="Application\HelloBundle"
83+
$ php app/console doctrine:migrations:status --bundle="Sensio\HelloBundle"
8484
8585
== Configuration
8686
8787
>> Name: HelloBundle Migrations
8888
>> Configuration Source: manually configured
8989
>> Version Table Name: hello_bundle_migration_versions
90-
>> Migrations Namespace: Application\HelloBundle\DoctrineMigrations
91-
>> Migrations Directory: /path/to/symfony-sandbox/src/Application/HelloBundle/DoctrineMigrations
90+
>> Migrations Namespace: Sensio\HelloBundle\DoctrineMigrations
91+
>> Migrations Directory: /path/to/symfony-sandbox/src/Sensio/HelloBundle/DoctrineMigrations
9292
>> Current Version: 0
9393
>> Latest Version: 2010-06-21 14:06:55 (20100621140655)
9494
>> Executed Migrations: 0
@@ -104,6 +104,6 @@ migrate:
104104

105105
.. code-block:: bash
106106
107-
$ php app/console doctrine:migrations:migrate --bundle="Application\HelloBundle"
107+
$ php app/console doctrine:migrations:migrate --bundle="Sensio\HelloBundle"
108108
109109
.. _documentation: http://www.doctrine-project.org/projects/migrations/2.0/docs/en

guides/doctrine/mongodb-odm/configuration.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ can control. The following configuration options exist for a mapping:
5252
mappings otherwise some of your documents cannot be found by Doctrine. This
5353
option defaults to the bundle namespace + ``Document``, for example for an
5454
application bundle called "Hello" prefix would be
55-
``Application\Hello\Document``.
55+
``Sensio\Hello\Document``.
5656
- ``alias`` Doctrine offers a way to alias document namespaces to simpler,
5757
shorter names to be used inqueries or for Repository access.
5858
- ``is_bundle`` This option is a derived value from ``dir`` and by default is
@@ -65,7 +65,7 @@ To avoid having to configure lots of information for your mappings you should
6565
follow these conventions:
6666

6767
1. Put all your entities in a directory ``Document/`` inside your bundle. For
68-
example ``Application/Hello/Document/``.
68+
example ``Sensio/Hello/Document/``.
6969
2. If you are using xml, yml or php mapping put all your configuration files
7070
into the ``Resources/config/doctrine/metadata/doctrine/mongodb/`` directory
7171
sufficed with dcm.xml, dcm.yml or dcm.php respectively.
@@ -226,9 +226,9 @@ annotations.
226226

227227
First, lets write a simple User class::
228228

229-
// src/Application/HelloBundle/Document/User.php
229+
// src/Sensio/HelloBundle/Document/User.php
230230

231-
namespace Application\HelloBundle\Document;
231+
namespace Sensio\HelloBundle\Document;
232232

233233
class User
234234
{

guides/doctrine/mongodb-odm/overview.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ just need to enable it and specify the bundle that contains your mapped document
2727
Now you can start writing documents and mapping them with annotations, xml, or
2828
yaml. In this example we will use annotations::
2929

30-
// Application/HelloBundle/Document/User.php
30+
// Sensio/HelloBundle/Document/User.php
3131

32-
namespace Application\HelloBundle\Document;
32+
namespace Sensio\HelloBundle\Document;
3333

3434
/**
3535
* @mongodb:Document(collection="users")
@@ -79,7 +79,7 @@ yaml. In this example we will use annotations::
7979

8080
Now, use your document and manage its persistent state with Doctrine::
8181

82-
use Application\HelloBundle\Document\User;
82+
use Sensio\HelloBundle\Document\User;
8383

8484
class UserController extends Controller
8585
{

guides/doctrine/orm/configuration.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Explicit definition of all the mapped entities is the only necessary
5656
configuration for the ORM and there are several configuration options that you
5757
can control. The following configuration options exist for a mapping:
5858

59-
- ``type`` One of "annotations", "xml", "yml", "php" or "static-php". This
59+
- ``type`` One of "annotation", "xml", "yml", "php" or "static-php". This
6060
specifies which type of metadata type your mapping uses.
6161
- ``dir`` Path to the mapping or entity files (depending on the driver). If
6262
this path is relative it is assumed to be relative to the bundle root. This
@@ -68,7 +68,7 @@ can control. The following configuration options exist for a mapping:
6868
mappings otherwise some of your entities cannot be found by Doctrine. This
6969
option defaults to the bundle namespace + ``Entity``, for example for an
7070
application bundle called "Hello" prefix would be
71-
``Application\Hello\Entity``.
71+
``Sensio\Hello\Entity``.
7272
- ``alias`` Doctrine offers a way to alias entity namespaces to simpler,
7373
shorter names to be used in DQL queries or for Repository access.
7474
- ``is_bundle`` This option is a derived value from ``dir`` and by default is
@@ -81,7 +81,7 @@ To avoid having to configure lots of information for your mappings you should
8181
follow these conventions:
8282

8383
1. Put all your entities in a directory ``Entity/`` inside your bundle. For
84-
example ``Application/Hello/Entity/``.
84+
example ``Sensio/Hello/Entity/``.
8585
2. If you are using xml, yml or php mapping put all your configuration files
8686
into the "Resources/config/doctrine/metadata/doctrine/orm/" directory sufficed
8787
with dcm.xml, dcm.yml or dcm.php respectively.

guides/doctrine/orm/overview.rst

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ necessary configuration is to specify the bundle name which contains your entiti
4646
As Doctrine provides transparent persistence for PHP objects, it works with
4747
any PHP class::
4848

49-
// Application/HelloBundle/Entity/User.php
50-
namespace Application\HelloBundle\Entity;
49+
// Sensio/HelloBundle/Entity/User.php
50+
namespace Sensio\HelloBundle\Entity;
5151

5252
class User
5353
{
@@ -84,8 +84,8 @@ write mapping information with annotations, XML, or YAML:
8484

8585
.. code-block:: php
8686
87-
// Application/HelloBundle/Entity/User.php
88-
namespace Application\HelloBundle\Entity;
87+
// Sensio/HelloBundle/Entity/User.php
88+
namespace Sensio\HelloBundle\Entity;
8989
9090
/**
9191
* @orm:Entity
@@ -95,7 +95,7 @@ write mapping information with annotations, XML, or YAML:
9595
/**
9696
* @orm:Id
9797
* @orm:Column(type="integer")
98-
* @orm:GeneratedValue(strategy="IDENTITY")
98+
* @orm:GeneratedValue(strategy="AUTO")
9999
*/
100100
protected $id;
101101
@@ -107,31 +107,31 @@ write mapping information with annotations, XML, or YAML:
107107
108108
.. code-block:: yaml
109109
110-
# Application/HelloBundle/Resources/config/doctrine/metadata/orm/Application.HelloBundle.Entity.User.dcm.yml
111-
Application\HelloBundle\Entity\User:
110+
# Sensio/HelloBundle/Resources/config/doctrine/metadata/orm/Sensio.HelloBundle.Entity.User.dcm.yml
111+
Sensio\HelloBundle\Entity\User:
112112
type: entity
113113
table: user
114114
id:
115115
id:
116116
type: integer
117117
generator:
118-
strategy: IDENTITY
118+
strategy: AUTO
119119
fields:
120120
name:
121121
type: string
122122
length: 50
123123
124124
.. code-block:: xml
125125
126-
<!-- Application/HelloBundle/Resources/config/doctrine/metadata/orm/Application.HelloBundle.Entity.User.dcm.xml -->
126+
<!-- Sensio/HelloBundle/Resources/config/doctrine/metadata/orm/Sensio.HelloBundle.Entity.User.dcm.xml -->
127127
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
128128
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
129129
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
130130
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
131131
132-
<entity name="Application\HelloBundle\Entity\User" table="user">
132+
<entity name="Sensio\HelloBundle\Entity\User" table="user">
133133
<id name="id" type="integer" column="id">
134-
<generator strategy="IDENTITY"/>
134+
<generator strategy="AUTO"/>
135135
</id>
136136
<field name="name" column="name" type="string" length="255" />
137137
</entity>
@@ -154,10 +154,10 @@ the following commands:
154154
155155
Eventually, use your entity and manage its persistent state with Doctrine::
156156

157-
// Application/HelloBundle/Controller/UserController.php
158-
namespace Application\HelloBundle\Controller;
157+
// Sensio/HelloBundle/Controller/UserController.php
158+
namespace Sensio\HelloBundle\Controller;
159159

160-
use Application\HelloBundle\Entity\User;
160+
use Sensio\HelloBundle\Entity\User;
161161

162162
class UserController extends Controller
163163
{
@@ -200,7 +200,7 @@ update your development database schema without blowing away everything and
200200
losing your existing data. So first lets just add a new property to our ``User``
201201
entity::
202202

203-
namespace Application\HelloBundle\Entities;
203+
namespace Sensio\HelloBundle\Entities;
204204

205205
/** @orm:Entity */
206206
class User

0 commit comments

Comments
 (0)