Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/query/PhamePostQuery.php
| Show All 23 Lines | public function withBloggerPHIDs(array $blogger_phids) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withBlogPHIDs(array $blog_phids) { | public function withBlogPHIDs(array $blog_phids) { | ||||
| $this->blogPHIDs = $blog_phids; | $this->blogPHIDs = $blog_phids; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withVisibility($visibility) { | public function withVisibility(array $visibility) { | ||||
| $this->visibility = $visibility; | $this->visibility = $visibility; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withPublishedAfter($time) { | public function withPublishedAfter($time) { | ||||
| $this->publishedAfter = $time; | $this->publishedAfter = $time; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
| if ($this->bloggerPHIDs) { | if ($this->bloggerPHIDs) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'bloggerPHID IN (%Ls)', | 'bloggerPHID IN (%Ls)', | ||||
| $this->bloggerPHIDs); | $this->bloggerPHIDs); | ||||
| } | } | ||||
| if ($this->visibility !== null) { | if ($this->visibility) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'visibility = %d', | 'visibility IN (%Ld)', | ||||
| $this->visibility); | $this->visibility); | ||||
| } | } | ||||
| if ($this->publishedAfter !== null) { | if ($this->publishedAfter !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'datePublished > %d', | 'datePublished > %d', | ||||
| $this->publishedAfter); | $this->publishedAfter); | ||||
| Show All 18 Lines | |||||