Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move all classes to src/ in tutorial rather than in entities/

  • Loading branch information...
commit 4ef8e8c7aa3dad6a70e8330d2a82e28dc3b83519 1 parent bd96441
Benjamin Eberlei authored March 17, 2013

Showing 1 changed file with 15 additions and 24 deletions. Show diff stats Hide diff stats

  1. 39  docs/en/tutorials/getting-started.rst
39  docs/en/tutorials/getting-started.rst
Source Rendered
@@ -63,14 +63,6 @@ requirements:
63 63
 -  A user can see all his reported or assigned bugs.
64 64
 -  Bugs can be paginated through a list-view.
65 65
 
66  
-.. warning::
67  
-
68  
-    This tutorial is incrementally building up your Doctrine 2
69  
-    knowledge and even lets you make some mistakes, to show some common
70  
-    pitfalls in mapping Entities to a database. Don't blindly
71  
-    copy-paste the examples here, it is not production ready without
72  
-    the additional comments and knowledge this tutorial teaches.
73  
-
74 66
 Setup Project
75 67
 -------------
76 68
 
@@ -83,7 +75,6 @@ the following contents:
83 75
     {
84 76
         "require": {
85 77
             "doctrine/orm": "2.*",
86  
-            "symfony/console": "2.*",
87 78
             "symfony/yaml": "2.*"
88 79
         },
89 80
         "autoload": {
@@ -110,14 +101,14 @@ You can prepare the directory structure:
110 101
     |-- config
111 102
     |   |-- xml
112 103
     |   `-- yaml
113  
-    `-- entities
  104
+    `-- src
114 105
 
115 106
 A first prototype
116 107
 -----------------
117 108
 
118 109
 We start with a simplified design for the bug tracker domain, by creating three
119 110
 classes ``Bug``, ``Product`` and ``User`` and putting them into
120  
-`entities/Bug.php`, `entities/Product.php` and `entities/User.php`
  111
+`src/Bug.php`, `src/Product.php` and `src/User.php`
121 112
 respectively. We want instances of this three classes to be saved
122 113
 in the database. A class saved into a database with Doctrine is called
123 114
 entity. Entity classes are part of the domain model of your application.
@@ -125,7 +116,7 @@ entity. Entity classes are part of the domain model of your application.
125 116
 .. code-block:: php
126 117
 
127 118
     <?php
128  
-    // entities/Bug.php
  119
+    // src/Bug.php
129 120
     class Bug
130 121
     {
131 122
         /**
@@ -149,7 +140,7 @@ entity. Entity classes are part of the domain model of your application.
149 140
 .. code-block:: php
150 141
 
151 142
     <?php
152  
-    // entities/Product.php
  143
+    // src/Product.php
153 144
     class Product
154 145
     {
155 146
         /**
@@ -180,7 +171,7 @@ entity. Entity classes are part of the domain model of your application.
180 171
 .. code-block:: php
181 172
 
182 173
     <?php
183  
-    // entities/User.php
  174
+    // src/User.php
184 175
     class User
185 176
     {
186 177
         /**
@@ -252,7 +243,7 @@ domain model to match the requirements:
252 243
 .. code-block:: php
253 244
 
254 245
     <?php
255  
-    // entities/Bug.php
  246
+    // src/Bug.php
256 247
     use Doctrine\Common\Collections\ArrayCollection;
257 248
 
258 249
     class Bug
@@ -270,7 +261,7 @@ domain model to match the requirements:
270 261
 .. code-block:: php
271 262
 
272 263
     <?php
273  
-    // entities/User.php
  264
+    // src/User.php
274 265
     use Doctrine\Common\Collections\ArrayCollection;
275 266
     class User
276 267
     {
@@ -349,7 +340,7 @@ the bi-directional reference:
349 340
 .. code-block:: php
350 341
 
351 342
     <?php
352  
-    // entities/Bug.php
  343
+    // src/Bug.php
353 344
     class Bug
354 345
     {
355 346
         // ... (previous code)
@@ -383,7 +374,7 @@ the bi-directional reference:
383 374
 .. code-block:: php
384 375
 
385 376
     <?php
386  
-    // entities/User.php
  377
+    // src/User.php
387 378
     class User
388 379
     {
389 380
         // ... (previous code)
@@ -438,7 +429,7 @@ the database that points from Bugs to Products.
438 429
 .. code-block:: php
439 430
 
440 431
     <?php
441  
-    // entities/Bug.php
  432
+    // src/Bug.php
442 433
     class Bug
443 434
     {
444 435
         // ... (previous code)
@@ -507,7 +498,7 @@ the most simple one:
507 498
     .. code-block:: php
508 499
 
509 500
         <?php
510  
-        // entities/Product.php
  501
+        // src/Product.php
511 502
         /**
512 503
          * @Entity @Table(name="products")
513 504
          **/
@@ -568,7 +559,7 @@ We then go on specifying the definition of a Bug:
568 559
     .. code-block:: php
569 560
 
570 561
         <?php
571  
-        // entities/Bug.php
  562
+        // src/Bug.php
572 563
         /**
573 564
          * @Entity @Table(name="bugs")
574 565
          **/
@@ -698,7 +689,7 @@ The last missing definition is that of the User entity:
698 689
     .. code-block:: php
699 690
 
700 691
         <?php
701  
-        // entities/User.php
  692
+        // src/User.php
702 693
         /**
703 694
          * @Entity @Table(name="users")
704 695
          **/
@@ -1274,7 +1265,7 @@ should be able to close a bug. This looks like:
1274 1265
 .. code-block:: php
1275 1266
 
1276 1267
     <?php
1277  
-    // entities/Bug.php
  1268
+    // src/Bug.php
1278 1269
 
1279 1270
     class Bug
1280 1271
     {
@@ -1354,7 +1345,7 @@ the previously discussed query functionality in it:
1354 1345
 .. code-block:: php
1355 1346
 
1356 1347
     <?php
1357  
-    // repositories/BugRepository.php
  1348
+    // src/BugRepository.php
1358 1349
 
1359 1350
     use Doctrine\ORM\EntityRepository;
1360 1351
 

0 notes on commit 4ef8e8c

Please sign in to comment.
Something went wrong with that request. Please try again.