This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:all:psr:psr-1 [25.05.2015 19:38] – translated name spaces and class names mrbaseman | en:dev:all:psr:psr-1 [03.06.2015 15:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
- | |||
[size=10]originating from [[http:// | [size=10]originating from [[http:// | ||
====== Basic Coding Standard ====== | ====== Basic Coding Standard ====== | ||
Line 82: | Line 80: | ||
<PHP> | <PHP> | ||
+ | <?php | ||
// PHP 5.3 and later: | // PHP 5.3 and later: | ||
namespace Vendor\Model; | namespace Vendor\Model; | ||
Line 114: | Line 113: | ||
</ | </ | ||
- | ===== Klassen- Konstanten, Eigenschaften und Methoden | + | ===== Class Constants, Properties, and Methods |
- | Das Term 'Klasse' | + | |
+ | The term 'class' | ||
+ | ==== Constants ==== | ||
+ | |||
+ | Class constants MUST be declared in all upper case with underscore separators. For example: | ||
- | ==== Konstanten ==== | ||
- | Klassenkonstanten MÜSSEN vollständig in Großbuchstaben deklariert werden. Der Unterstrich trennt einzelne Worte. | ||
<PHP> | <PHP> | ||
<?php | <?php | ||
Line 126: | Line 127: | ||
{ | { | ||
const VERSION = ' | const VERSION = ' | ||
- | const DATE_APPROVED = '2014-08-12'; | + | const DATE_APPROVED = '2012-06-01'; |
} | } | ||
</ | </ | ||
- | ==== Eigenschaften | + | ==== Properties |
- | Dieser Leitfaden vermeidet absichtlich jede Empfehlung in Bezug auf die Verwendung von $**StudlyCaps**, | + | |
- | Welche Namenskonvention auch benutzt wird, sie SOLLTE konsistent in einem vertretbaren Rahmen angewendet werden. | + | |
- | :!: //Anpassung an WB:// Es MUSS durchgehend überall das **StudlyCaps** | + | This guide intentionally avoids any recommendation regarding the use of $**StudlyCaps**, |
- | >>' | + | Whatever naming convention is used SHOULD be applied consistently within a reasonable scope. That scope may be vendor-level, |
+ | |||
+ | :!: //Adaption to WB:// It is REQUIRED that the **StudlyCaps** | ||
+ | >>' | ||
<PHP> | <PHP> | ||
Line 143: | Line 145: | ||
</ | </ | ||
- | ==== Methoden ==== | ||
- | Methodennamen MÜSSEN in **camelCase()** deklariert werden. | ||
+ | ==== Methods ==== | ||
+ | |||
+ | Method names MUST be declared in **camelCase()**. | ||
--- // | --- // | ||