Merge pull request #47 from creative-commoners/pulls/4.0/dataformatter-enhancement

ENHANCEMENT DataFormatter setters return for chaining
This commit is contained in:
Robbie Averill 2017-12-07 15:19:31 +13:00 committed by GitHub
commit 852ca334b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,10 +189,12 @@ abstract class DataFormatter
/**
* @param array $fields
* @return $this
*/
public function setCustomFields($fields)
{
$this->customFields = $fields;
return $this;
}
/**
@ -205,18 +207,22 @@ abstract class DataFormatter
/**
* @param array $fields
* @return $this
*/
public function setCustomAddFields($fields)
{
$this->customAddFields = $fields;
return $this;
}
/**
* @param array $relations
* @return $this
*/
public function setCustomRelations($relations)
{
$this->customRelations = $relations;
return $this;
}
/**
@ -237,10 +243,12 @@ abstract class DataFormatter
/**
* @param array $fields
* @return $this
*/
public function setRemoveFields($fields)
{
$this->removeFields = $fields;
return $this;
}
/**
@ -258,10 +266,12 @@ abstract class DataFormatter
/**
* @param int $size
* @return $this
*/
public function setTotalSize($size)
{
$this->totalSize = (int)$size;
return $this;
}
/**
@ -326,7 +336,6 @@ abstract class DataFormatter
abstract public function supportedMimeTypes();
/**
* Convert a single data object to this format. Return a string.
*/