diff --git a/.gitignore b/.gitignore
index 02ed2e2..38fe785 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,12 @@
# Ignore data/ and tmp/
data/
tmp/
-# Ignore unit testing logs and eclipse project files
-tst/log/
-.settings/
-.buildpath
-.project
# Ignore for safety
.htaccess
.htpasswd
+# Ignore unit testing logs, api docs and eclipse project files
+tst/log/
+doc/
+.settings/
+.buildpath
+.project
diff --git a/doc/README.md b/doc/README.md
new file mode 100644
index 0000000..a3baf68
--- /dev/null
+++ b/doc/README.md
@@ -0,0 +1,19 @@
+Generating documentation
+========================
+
+In order to generate the documentation, you will need to install the following
+packages and its dependencies:
+* phpdoc
+* graphviz
+
+Details about [installing phpDocumentor](http://phpdoc.org/docs/latest/getting-started/installing.html)
+can be found in its own documentation.
+
+Example for Debian and Ubuntu:
+ $ sudo aptitude install pear graphviz
+ $ sudo pear channel-discover pear.phpdoc.org
+ $ sudo pear install phpdoc/phpDocumentor
+
+To generate the documentation, change into the main directory and run phpdoc:
+ $ cd ZeroBin
+ $ phpdoc -d lib/ -t doc/
diff --git a/lib/RainTPL.php b/lib/RainTPL.php
index 817e645..b77b3ee 100644
--- a/lib/RainTPL.php
+++ b/lib/RainTPL.php
@@ -1,15 +1,17 @@
), stylesheet (), script (