[formats] Rename variable 'data' to 'item'

This makes the intend of the variable more clear and is now
coherent with all Bridges
This commit is contained in:
logmanoriginal 2016-08-29 19:47:21 +02:00
parent a84016bcb6
commit cf146523be
6 changed files with 27 additions and 28 deletions

View file

@ -16,7 +16,7 @@ abstract class FormatAbstract implements FormatInterface{
protected
$contentType,
$charset,
$datas,
$items,
$extraInfos
;
@ -48,17 +48,16 @@ abstract class FormatAbstract implements FormatInterface{
return $this;
}
public function setItems(array $datas){
$this->datas = $datas;
public function setItems(array $items){
$this->items = $items;
return $this;
}
public function getItems(){
if( !is_array($this->datas) ){
if(!is_array($this->items))
throw new \LogicException('Feed the ' . get_class($this) . ' with "setItems" method before !');
}
return $this->datas;
return $this->items;
}
/**