Intergate smarty and doctrine