User Tools

Site Tools


en:dev:all:wb-adaption

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:dev:all:wb-adaption [13.06.2015 16:19] – [Emulated namespaces] translated second paragraph mrbasemanen:dev:all:wb-adaption [13.06.2015 16:37] – [Funktionen und Methoden] translated mrbaseman
Line 55: Line 55:
 **Classes of ACP**: (AdminControlPanel => Former backend) are located in the directory **''wb/admin/''** or one of its subdirectories. The ClassIdentifier must necessarily get the prefix '**a_**'. **Example:** a_Pages_PageTree\\ **Classes of ACP**: (AdminControlPanel => Former backend) are located in the directory **''wb/admin/''** or one of its subdirectories. The ClassIdentifier must necessarily get the prefix '**a_**'. **Example:** a_Pages_PageTree\\
 **Classes of third-party libraries**: lying in the directory **''wb/include/''** and its subdirectories are not automatically covered by the autoloader. However, each library has the ability to carry out its own registration in the SPL autoloader stack. More on this can be found in the description of the autoloader the respective WB version. **Classes of third-party libraries**: lying in the directory **''wb/include/''** and its subdirectories are not automatically covered by the autoloader. However, each library has the ability to carry out its own registration in the SPL autoloader stack. More on this can be found in the description of the autoloader the respective WB version.
-==== Dateinamen ==== +==== Filenames ==== 
-Soweit die vorgenannten Regeln für Klassennamen eingehalten wurdenergeben sich die Dateinamen eindeutig aus den KlassennamenDie Klasse **m_MyModul_PluginAbstract** findet sich demnach in der Datei **''wb/modules/MyModul/PluginAbstract.php''**.\\ +As far as the above-mentioned rules for class names have been complied withthe filename would clearly result from the class nameThe class **m_MyModul_PluginAbstract** accordingly can be found in the file **''wb/modules/MyModul/PluginAbstract.php''**.\\ 
-Für alle anderen Dateien sind nur alphanummerische Zeichen und der Bindestrich (**-**) gestattetLeerzeichen sind völlig verboten.\\ +For all other files, only alphanumeric characters and the dash (**-**) are allowedSpaces are strictly prohibited.\\ 
-Jede Datei, die ausführbaren PHP Code enthält sollte mit der Endung **.php** enden und in UpperCamelCase-Schreibweise ausgeführt sein. +Each file which contains executable PHP code should end with the extension **.php** and be carried out in UpperCamelCase.
-==== Verzeichnise ==== +
-Zur Benennung von Verzeichnissen gelten die selben Grundlagen wie für Dateien. Es sind nur alphanummerische Zeichen sowie nur wenige Sonderzeichen des Standard 7-Bit-ASCII Bereiches <128 (**[color=blue] ! # - . @ ~ [/color]**) zulässig. Wie bei Dateinamen, sind Leerzeichen und der Unterstrich grundsätzlich verboten.  +
-==== Funktionen und Methoden ====+
  
-Funktionsund Methodennamen dürfen nur Alphanummerische Zeichen enthaltenUnterstriche sind nicht gestattet. Nummern sind in Funktionsnamen gestattet aber in den meisten Fällen nicht empfohlen. +==== Directories ==== 
-Wortreichtum wird generell befürwortetFunktionsnamen sollten so wortreich wie möglich sein um deren Zweck und Verhalten möglichst genau zu erklären.+For naming directories the same basis as for files apply. Only alphanumeric characters and a few special characters of standard 7-bit ASCII range <128 (**[color=blue] ! # - . @ ~ [/color]**) are allowedAs with file names, spaces, and the underscore are prohibited.
  
-Funktionen oder Methoden sollen möglichst immer in //**lowerCamelCase**// (oder einfach //**camelCase**//) geschrieben werden. Das bedeutet, mit einem klein geschriebenen Verb wie //get//, //set//, //add//, //delete//, //load//, //save//, //execute// etc. beginnen, das dann von einem Substantiv in StudlyCaps gefolgt werden kann, welches das zu bearbeitende Objekt beschreibt. Beispiel: <php> $oMyObject->saveItemList(); </php> oder <php> reloadAllModules(); </php>+==== Functions and Methods ====
  
-:!: **Achtung:** Es dürfen niemals doppelte Unterstriche als Prefix für Methoden-Funktions- oder Variablennamen verwendet werdenEs besteht hier die Gefahr, dass es zu Überschneidungen mit aktuellen oder zukünftigen, PHP-eigenen Magic-Functions etc. kommt.+Function and method names may only contain alphanumeric characters. Underscores are not permitted. Numbers are however permitted in function names in most cases however not recommended. Verbosity is generally encouraged. Function names should be as verbose as possible to describe their purpose and behavior as precisely as possible. 
 + 
 +Functions or methods have to be written whenever possible in //**lowerCamelCase**// (or simply //**camelCase**//). This means they should begin with a lowercase verb like //get//, //set//, //add//, //delete//, //load//, //save//, //execute// etc. followed by a noun in StudlyCaps that describes the object to be processed. Example: <php> $oMyObject->saveItemList(); </php> or <php> reloadAllModules(); </php> 
 + 
 +:!: **Warning:** doulble underscores may never be used as a prefix for methodfunction, or variable namesThere is the danger that it overlaps with current or future, PHP's intrinsic Magic Functions etc..
  
en/dev/all/wb-adaption.txt · Last modified: 13.06.2015 16:39 by mrbaseman