Add or convert to phpdoc more template functions documentation.

Signed-off-by: enyst <engel.nyst@gmail.com>