*/ class ServiceStream extends AbstractService { public function __construct(helper_plugin_sqlite $sqlite) { parent::__construct($sqlite, 'stream', ModelStream::class); } public function findByName(string $name): ?ModelStream { $res = $this->sqlite->query('SELECT * FROM ' . $this->table . ' WHERE name=?', $name); return ($this->modelClassName)::createFromArray($this->sqlite, $res->fetch()); } }