Example #1
0
 public static function each($view, $collection, $item = 'item', array $scope = array())
 {
     if (Fn::iterable($collection)) {
         $tmpl = $tmpl = Ant::init()->fromFile($view);
         foreach ($collection as $single) {
             $scope[$item] = $single;
             echo $tmpl->assign($scope)->draw();
         }
     }
 }