| @@ 113-121 (lines=9) @@ | ||
| 110 | * @return \Generator|Results\Movie |
|
| 111 | * @throws TmdbException |
|
| 112 | */ |
|
| 113 | public function movie(string $query, array $options = array()) : \Generator |
|
| 114 | { |
|
| 115 | try { |
|
| 116 | $this->logger->debug('Starting search movie', array('query' => $query, 'options' => $options)); |
|
| 117 | return $this->searchItem('movie', $query, $options, Results\Movie::class); |
|
| 118 | } catch (TmdbException $ex) { |
|
| 119 | throw $ex; |
|
| 120 | } |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * Search a TV Show |
|
| @@ 130-138 (lines=9) @@ | ||
| 127 | * @return \Generator|Results\TVShow |
|
| 128 | * @throws TmdbException |
|
| 129 | */ |
|
| 130 | public function tvshow(string $query, array $options = array()) : \Generator |
|
| 131 | { |
|
| 132 | try { |
|
| 133 | $this->logger->debug('Starting search tv show', array('query' => $query, 'options' => $options)); |
|
| 134 | return $this->searchItem('tv', $query, $options, Results\TVShow::class); |
|
| 135 | } catch (TmdbException $ex) { |
|
| 136 | throw $ex; |
|
| 137 | } |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * Search a collection |
|
| @@ 147-155 (lines=9) @@ | ||
| 144 | * @return \Generator|Results\Collection |
|
| 145 | * @throws TmdbException |
|
| 146 | */ |
|
| 147 | public function collection(string $query, array $options = array()) : \Generator |
|
| 148 | { |
|
| 149 | try { |
|
| 150 | $this->logger->debug('Starting search collection', array('query' => $query, 'options' => $options)); |
|
| 151 | return $this->searchItem('collection', $query, $options, Results\Collection::class); |
|
| 152 | } catch (TmdbException $ex) { |
|
| 153 | throw $ex; |
|
| 154 | } |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * Search a people |
|
| @@ 164-172 (lines=9) @@ | ||
| 161 | * @return \Generator|Results\People |
|
| 162 | * @throws TmdbException |
|
| 163 | */ |
|
| 164 | public function people(string $query, array $options = array()) : \Generator |
|
| 165 | { |
|
| 166 | try { |
|
| 167 | $this->logger->debug('Starting search people', array('query' => $query, 'options' => $options)); |
|
| 168 | return $this->searchItem('person', $query, $options, Results\People::class); |
|
| 169 | } catch (TmdbException $ex) { |
|
| 170 | throw $ex; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Search a company |
|
| @@ 181-189 (lines=9) @@ | ||
| 178 | * @return \Generator|Results\Company |
|
| 179 | * @throws TmdbException |
|
| 180 | */ |
|
| 181 | public function company(string $query, array $options = array()) : \Generator |
|
| 182 | { |
|
| 183 | try { |
|
| 184 | $this->logger->debug('Starting search company', array('query' => $query, 'options' => $options)); |
|
| 185 | return $this->searchItem('company', $query, $options, Results\Company::class); |
|
| 186 | } catch (TmdbException $ex) { |
|
| 187 | throw $ex; |
|
| 188 | } |
|
| 189 | } |
|
| 190 | } |
|
| 191 | ||