$val){ if ($val !== null) $data[$key] = $val; } if(sizeof($data) < 1){ return null; } return $data; } /** * @return mixed */ public function getKey() { return $this->key; } /** * @param mixed $key */ public function setKey($key) { $this->key = $key; } /** * @return mixed */ public function getName() { return $this->name; } /** * @param mixed $name */ public function setName($name) { $this->name = $name; } /** * @return mixed */ public function getValue() { return $this->value; } /** * @param mixed $value */ public function setValue($value) { $this->value = $value; } }