| @@ 87-96 (lines=10) @@ | ||
| 84 | * @return \Generator|Results\Movie |
|
| 85 | * @throws TmdbException |
|
| 86 | */ |
|
| 87 | public function movie($query, array $options = array()) |
|
| 88 | { |
|
| 89 | try |
|
| 90 | { |
|
| 91 | $this->logger->debug('Starting search movie'); |
|
| 92 | return $this->searchItem('movie', $query, $options, Results\Movie::class); |
|
| 93 | } catch (TmdbException $ex) { |
|
| 94 | throw $ex; |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| 98 | /** |
|
| 99 | * Search a TV Show |
|
| @@ 105-114 (lines=10) @@ | ||
| 102 | * @return \Generator|Results\TVShow |
|
| 103 | * @throws TmdbException |
|
| 104 | */ |
|
| 105 | public function tvshow($query, array $options = array()) |
|
| 106 | { |
|
| 107 | try |
|
| 108 | { |
|
| 109 | $this->logger->debug('Starting search tv show'); |
|
| 110 | return $this->searchItem('tv', $query, $options, Results\TVShow::class); |
|
| 111 | } catch (TmdbException $ex) { |
|
| 112 | throw $ex; |
|
| 113 | } |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Search a collection |
|
| @@ 123-132 (lines=10) @@ | ||
| 120 | * @return \Generator|Results\Collection |
|
| 121 | * @throws TmdbException |
|
| 122 | */ |
|
| 123 | public function collection($query, array $options = array()) |
|
| 124 | { |
|
| 125 | try |
|
| 126 | { |
|
| 127 | $this->logger->debug('Starting search collection'); |
|
| 128 | return $this->searchItem('collection', $query, $options, Results\Collection::class); |
|
| 129 | } catch (TmdbException $ex) { |
|
| 130 | throw $ex; |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * Search a people |
|
| @@ 141-152 (lines=12) @@ | ||
| 138 | * @return \Generator|Results\People |
|
| 139 | * @throws TmdbException |
|
| 140 | */ |
|
| 141 | public function people($query, array $options = array()) |
|
| 142 | { |
|
| 143 | try |
|
| 144 | { |
|
| 145 | $this->logger->debug('Starting search people'); |
|
| 146 | return $this->searchItem('people', $query, $options, Results\People::class); |
|
| 147 | } |
|
| 148 | catch (TmdbException $ex) |
|
| 149 | { |
|
| 150 | throw $ex; |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * Search a company |
|
| @@ 161-172 (lines=12) @@ | ||
| 158 | * @return \Generator|Results\Company |
|
| 159 | * @throws TmdbException |
|
| 160 | */ |
|
| 161 | public function company($query, array $options = array()) |
|
| 162 | { |
|
| 163 | try |
|
| 164 | { |
|
| 165 | $this->logger->debug('Starting search company'); |
|
| 166 | return $this->searchItem('people', $query, $options, Results\Company::class); |
|
| 167 | } |
|
| 168 | catch (TmdbException $ex) |
|
| 169 | { |
|
| 170 | throw $ex; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Get page from result search |
|