Konfigurationsmethoden

  1. setOutputMode(mode)
  2. setEncoding(encoding)
  3. Other methods

PHPTAL versucht die bestmöglichen Grundeinstellungen zu verwenden. Eine Änderung sollte nicht nötig sein.

All of these are methods of the PHPTAL class. set* methods return instance of their class, so you can chain them:


<?php
  echo $phptal->setPhpCodeDestination('/tmp/phptal')->setOutputMode(PHPTAL::XML)->setTemplate('tpl.zpt')->execute();
?>

is the same as:


<?php
  $phptal->setPhpCodeDestination('/tmp/phptal');
  $phptal->setOutputMode(PHPTAL::XML);
  $phptal->setTemplate('tpl.zpt');
  echo $phptal->execute();
?>

There are other set* methods for filters, internationalisation, etc. They have been described in other sections of this manual.