Using This Manual
This manual has been designed with (mostly) standardized formatting to help you get started with DataMapper ORM as quickly as possible.
Code Formatting
Ths code in this manual has been color-coded and formatted to make it easier to see DataMapper-specific components, as well as making the PHP easier to read. Some of the examples, specifically those that are from or are complete files, may have line numbers. You should be able to copy-and-paste code beside the line numbers without worrying about the numbers in the pasted code.
This table shows the most common colors you will see in the manual.
Sample | Meaning |
---|---|
/* Comment */ |
Code comments. |
keyword |
PHP keywords, such as foreach or switch. |
'value' |
General values, such as strings and numbers. |
$variable general_function() |
Normal PHP variables, or non-native standalone functions. |
php_functions() |
Built-in PHP functions, such as htmlspecialchars. |
$DataMapper->method() |
Special DataMapper methods added to DataMapper models. |
$DataMapper->property var $dm_property |
Special properties added by DataMapper to models. |
$DataMapper-> |
This is either highlighting important code, or may be referencing methods only available from an extension. |
new_information |
Highlights important code, that often has just been changed from the previous example. |
This format should be fairly consistent. Some areas bolded text has been used to highlight information as well.
Special Content
Besides the special content, there are also special sections that may be designed to stand out.
Important Section
Important sections highlight critical information than can affect your usage of DataMapper, or may corrupt data if used incorrectly.
Note Section
Notes signify information that is important to getting the best out of DataMapper.
Highlighted Section
These sections often stand out from the regular sections because they are advanced or non-critical features.
Sample Code Note
Example Application
This highlights that there is more sample code available elsewhere.
To the far right is an examples note. If you see one of these, it means that there is more sample code available elsewhere.