4 /***************************************************************************\
5 * SPIP, Systeme de publication pour l'internet *
7 * Copyright (c) 2001-2016 *
8 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
10 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
11 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
12 \***************************************************************************/
14 if (!defined('_ECRIRE_INC_VERSION')) return;
17 // creer une boucle sur un iterateur
18 // annonce au compilo les "champs" disponibles
20 function iterateur_php_dist($b, $iteratorName) {
21 $b->iterateur
= $iteratorName; # designe la classe d'iterateur
28 foreach (get_class_methods($iteratorName) as $method) {
29 $b->show
['field'][ strtolower($method) ] = 'METHOD';
32 foreach (get_class_vars($iteratorName) as $property) {
33 $b->show['field'][ strtolower($property) ] = 'PROPERTY';