titolo = $titolo; $this->extensions[$ext] = $ext; } public function getFilter() { $new = new stdClass(); $new->titolo = $this->titolo; //riordino le chiavi sort($this->extensions); $new->extensions = implode(',', $this->extensions); return json_encode($new); } public function addExt($newExt) { $this->extensions[$newExt] = $newExt; return $this; } }