Added basic template definition.
Added optional packageID parameter.
Updated PHPDoc, added optional environment argument.