/** * Ricerca titoli per nome */ private function api_titoli_cerca() { $t = []; if (!isset($this->par['t'])) { $this->par['t'] = -1; } foreach (Titolo::cerca($this->par['query'], $this->par['t']) as $titolo) { $t[] = [$titolo->id, $titolo->nome]; } return $t; }