You are here

public function QPTPL::tplAll in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/Extension/QPTPL.php \QPTPL::tplAll()
  2. 7.2 QueryPath/Extension/QPTPL.php \QPTPL::tplAll()

File

QueryPath/Extension/QPTPL.php, line 29

Class

QPTPL

Code

public function tplAll($template, $objects, $options = array()) {
  $tqp = qp($template, ':root');
  foreach ($objects as $object) {
    if (is_array($object)) {
      $tqp = $this
        ->tplArrayR($tqp, $object, $options);
    }
    elseif (is_object($object)) {
      $tqp = $this
        ->tplObject($tqp, $object, $options);
    }
  }
  return $this->qp
    ->append($tqp
    ->top());
}