Skip to content

Commit

Permalink
remove dynamic getter&setter because it was already there :o)
Browse files Browse the repository at this point in the history
  • Loading branch information
cschalenborgh committed Oct 26, 2015
1 parent 7fb1879 commit de6e452
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/ZalandoPHP/Operations/Articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,4 @@ public function setFullText($search)

}


/**
* Magic setter and getter functions so we can dynamically set filters
* @see https://github.com/zalando/shop-api-documentation/wiki/Filter
*
* @param string $methodName Methodname
* @param string $value Value
*
* @return \ZalandoPHP\Operations\Articles
*/
public function __call($methodName, $value)
{
if (substr($methodName, 0, 3) == 'set') {
$this->filter[lcfirst(substr($methodName, 3))] = array_shift($value);
return $this;
}
if (substr($methodName, 0, 3) == 'get') {
$keyName = lcfirst(substr($methodName, 3));
return isset($this->filter[$keyName]) ? $this->filter[$keyName] : null;
}

return $this;
}


}

0 comments on commit de6e452

Please sign in to comment.