@@ -23,22 +23,39 @@ detail.
23
23
General Bundle Standards
24
24
------------------------
25
25
26
- File Naming
27
- ~~~~~~~~~~~
26
+ Class File Naming
27
+ ~~~~~~~~~~~~~~~~~
28
28
29
- Composite filenames (and by extension class names) SHOULD place the subject
30
- first:
29
+ Composite class names SHOULD place the subject first:
31
30
32
31
+-------------------------+-------------------------+
33
32
| Bad | Good |
34
33
+=========================+=========================+
35
- | ``phpcr-admin.xml `` | ``admin-phpcr.xml `` |
36
- +-------------------------+-------------------------+
37
34
| FoobarMenuNode | MenuNodeFoobar |
38
35
+-------------------------+-------------------------+
39
36
| AllFeaturesSimpleBlock | SimpleBlockAllFeatures |
40
37
+-------------------------+-------------------------+
41
38
39
+ Configuration File Naming
40
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
41
+
42
+ Configuration files for services SHOULD copy structure of the namespace up to
43
+ the level of abstraction required. Each element of a namespace MAY also be
44
+ compressed (e.g. event-listener => event).
45
+
46
+ A suffix may be added to allow different variations of the same configuration
47
+ file.
48
+
49
+ Examples:
50
+
51
+ * ``event-imagine-phpcr.xml `` and ``event-imagine-orm.xml `` for an event
52
+ subscriber with namespace
53
+ ``[BundleName]\EventListener\ImagineCacheInvalidatorSubscriber ``
54
+ * ``doctrine-phpcr.xml `` for all classes in the ``[BundleName]\Doctrine\Phpcr ``
55
+ namespace.
56
+ * ``admin-imagine.xml `` for classes in the ``[BundleName]\Admin\Imagine ``
57
+ namespace.
58
+
42
59
Interface Naming
43
60
~~~~~~~~~~~~~~~~
44
61
@@ -81,7 +98,7 @@ If either or both "Read" and "Write" interfaces do not exist, then the
81
98
Dependency Container Configuration
82
99
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83
100
84
- Refer the the `service naming conventions `_ in the symfony documentation.
101
+ Refer to the `service naming conventions `_ in the Symfony documentation.
85
102
86
103
Meta: README, CHANGELOG, etc
87
104
----------------------------
0 commit comments