Valider 084372dc rédigé par Fil's avatar Fil
Parcourir les fichiers

reecriture de tous les iterateurs sur le mode de la class Iterator de PHP

http://php.net/manual/fr/class.iterator.php

il devient possible de faire :

{{{
<?php
$s = new IterSQL(

array (
    'select' => 
    array (
      0 => 'articles.date',
      1 => 'articles.id_article',
      2 => 'articles.id_rubrique',
      3 => 'articles.titre',
      5 => 'articles.descriptif',
      6 => 'articles.chapo',
      7 => 'articles.lang',
    ),
    'from' => 
    array (
      'articles' => 'spip_articles',
    ),
    'type' => 
    array (
    ),
    'where' => 
    array (
      0 => 
      array (
        0 => '=',
        1 => 'articles.statut',
        2 => '\'publie\'',
      ),
      1 => '1=1',
    ),
    'join' => 
    array (
    ),
    'groupby' => 
    array (
    ),
    'orderby' => 
    array (
      0 => 'articles.date DESC',
    ),
    'limit' => '0,1',
    'having' => 
    array (
    ),
    'table' => 'articles',
    'id' => '_articles_recents',
    'connect' => '',
  )

);

foreach ($s as $k=>$v) {
	var_dump($v);
}

?>
}}}

mais aussi :

{{{
<?php

$s = new IterDATA(
	array (
	'source' => 'http://rezo.net/backend/',
	'sourcemode' => 'rss'
  )
);

foreach ($s as $k=>$v) {
	var_dump($v);
}

?>
}}}
parent 403a3446
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter