Protection boucle foreach
This commit is contained in:
parent
f9193bf2bf
commit
e6a65368fe
@ -16,10 +16,12 @@ Class RatiosData
|
||||
public function __construct($ratios)
|
||||
{
|
||||
//Organisation des ratios secteurs
|
||||
foreach($ratios->RatiosSecteur->item as $item){
|
||||
foreach($item->liste->item as $ratiosItem){
|
||||
$this->ratiosSecteur[$item->annee][$ratiosItem->id] = $ratiosItem->val;
|
||||
}
|
||||
if (count($ratios->RatiosSecteur->item)>0){
|
||||
foreach($ratios->RatiosSecteur->item as $item){
|
||||
foreach($item->liste->item as $ratiosItem){
|
||||
$this->ratiosSecteur[$item->annee][$ratiosItem->id] = $ratiosItem->val;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Orgnaisation des informations des ratios
|
||||
foreach($ratios->RatiosInfos->item as $item){
|
||||
@ -27,17 +29,19 @@ Class RatiosData
|
||||
}
|
||||
|
||||
//Orgnaisation RatiosEntrep et RatiosEntrepEvol
|
||||
foreach($ratios->BilansInfos->item as $item)
|
||||
{
|
||||
$this->bilansInfo[$item->typeBilan][$item->dateCloture] = $item;
|
||||
foreach($item->RatiosEntrep->item as $ratiosItem){
|
||||
$this->ratiosEntrep[$item->typeBilan][$item->dateCloture][$ratiosItem->id] = $ratiosItem->val;
|
||||
if (count($ratios->BilansInfos->item)>0){
|
||||
foreach($ratios->BilansInfos->item as $item)
|
||||
{
|
||||
$this->bilansInfo[$item->typeBilan][$item->dateCloture] = $item;
|
||||
foreach($item->RatiosEntrep->item as $ratiosItem){
|
||||
$this->ratiosEntrep[$item->typeBilan][$item->dateCloture][$ratiosItem->id] = $ratiosItem->val;
|
||||
}
|
||||
foreach($item->RatiosEntrepEvol->item as $ratiosItem){
|
||||
$this->ratiosEntrepEvol[$item->typeBilan][$item->dateCloture][$ratiosItem->id] = $ratiosItem->val;
|
||||
}
|
||||
//Comptage de bilans
|
||||
$this->{'nbBilan'.$item->typeBilan}++;
|
||||
}
|
||||
foreach($item->RatiosEntrepEvol->item as $ratiosItem){
|
||||
$this->ratiosEntrepEvol[$item->typeBilan][$item->dateCloture][$ratiosItem->id] = $ratiosItem->val;
|
||||
}
|
||||
//Comptage de bilans
|
||||
$this->{'nbBilan'.$item->typeBilan}++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user