Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8d56f0

Browse files
committed
Tweaks
1 parent e460402 commit c8d56f0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bundles/best_practices.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ interoperability standard for PHP namespaces and class names: it starts with a
2222
vendor segment, followed by zero or more category segments, and it ends with the
2323
namespace short name, which must end with ``Bundle``.
2424

25-
A namespace becomes a bundle as soon as you add a bundle class to it. The
26-
bundle class name must follow these rules:
25+
A namespace becomes a bundle as soon as you add "a bundle class" to it (which is
26+
a class that extends :class:`Symfony\\Component\\HttpKernel\\Bundle\\Bundle`).
27+
The bundle class name must follow these rules:
2728

28-
* Extend Symfony\Component\HttpKernel\Bundle\Bundle
2929
* Use only alphanumeric characters and underscores;
3030
* Use a StudlyCaps name (i.e. camelCase with an uppercase first letter);
3131
* Use a descriptive and short name (no more than two words);
@@ -42,6 +42,9 @@ Namespace Bundle Class Name
4242
``Acme\BlogBundle`` AcmeBlogBundle
4343
========================== ==================
4444

45+
By convention, the ``getName()`` method of the bundle class should return the
46+
class name.
47+
4548
.. note::
4649

4750
If you share your bundle publicly, you must use the bundle class name as

0 commit comments

Comments
 (0)