titolo = $titolo; $this->extensions[$ext] = $ext; } public function getFilter() { $new = new stdClass(); $new->titolo = $this->titolo; $new->extensions = implode(',', $this->extensions); return json_encode($new); } }