Snuze  0.8.1
snuze\Reddit\Thing\Link Class Reference
Inheritance diagram for snuze\Reddit\Thing\Link:

Public Member Functions

 __construct ()
 
 getAllAwardings ()
 
 getAllowLiveComments ()
 
 getApproved ()
 
 setApproved (bool $approved=null)
 
 getApprovedAtUtc ()
 
 getApprovedBy ()
 
 getArchived ()
 
 getAuthor ()
 
 getAuthorCakeday ()
 
 getAuthorFlairBackgroundColor ()
 
 getAuthorFlairCssClass ()
 
 getAuthorFlairRichtext ()
 
 getAuthorFlairTemplateId ()
 
 getAuthorFlairText ()
 
 getAuthorFlairTextColor ()
 
 getAuthorFlairType ()
 
 getAuthorFullname ()
 
 getAuthorPatreonFlair ()
 
 getBannedAtUtc ()
 
 getBannedBy ()
 
 getCanGild ()
 
 getCanModPost ()
 
 getCategory ()
 
 getClicked ()
 
 getCollections ()
 
 getContentCategories ()
 
 getContestMode ()
 
 getCrosspostParent ()
 
 getCrosspostParentList ()
 
 getDiscussionType ()
 
 getDistinguished ()
 
 getDomain ()
 
 getDowns ()
 
 getEdited ()
 
 getEventEnd ()
 
 setEventEnd (float $eventEnd=null)
 
 getEventIsLive ()
 
 setEventIsLive (bool $eventIsLive=null)
 
 getEventStart ()
 
 setEventStart (float $eventStart=null)
 
 getGilded ()
 
 getGildings ()
 
 getHidden ()
 
 getHideScore ()
 
 getIgnoreReports ()
 
 setIgnoreReports (bool $ignoreReports=null)
 
 getIsCrosspostable ()
 
 getIsMeta ()
 
 getIsOriginalContent ()
 
 getIsRedditMediaDomain ()
 
 getIsRobotIndexable ()
 
 getIsSelf ()
 
 getIsVideo ()
 
 getLikes ()
 
 getLinkFlairBackgroundColor ()
 
 getLinkFlairCssClass ()
 
 getLinkFlairRichtext ()
 
 getLinkFlairTemplateId ()
 
 getLinkFlairText ()
 
 getLinkFlairTextColor ()
 
 getLinkFlairType ()
 
 getLocked ()
 
 getMedia ()
 
 getMediaEmbed ()
 
 getMediaMetadata ()
 
 getMediaOnly ()
 
 getModNote ()
 
 getModReasonBy ()
 
 getModReasonTitle ()
 
 getModReports ()
 
 getName ()
 
 getNoFollow ()
 
 getNumComments ()
 
 getNumCrossposts ()
 
 getNumReports ()
 
 getOver18 ()
 
 getParentWhitelistStatus ()
 
 getPermalink ()
 
 getPinned ()
 
 getPostHint ()
 
 getPreview ()
 
 getPwls ()
 
 getQuarantine ()
 
 getRemovalReason ()
 
 getRemoved ()
 
 setRemoved (bool $removed=null)
 
 getReportReasons ()
 
 getRteMode ()
 
 setRteMode ($rteMode)
 
 getSaved ()
 
 getScore ()
 
 getSecureMedia ()
 
 getSecureMediaEmbed ()
 
 getSelftext ()
 
 getSelftextHtml ()
 
 getSendReplies ()
 
 getSpam ()
 
 setSpam (bool $spam=null)
 
 getSpoiler ()
 
 getStewardReports ()
 
 setStewardReports (array $stewardReports)
 
 getStickied ()
 
 getSubreddit ()
 
 getSubredditId ()
 
 getSubredditNamePrefixed ()
 
 getSubredditSubscribers ()
 
 getSubredditType ()
 
 getSuggestedSort ()
 
 getThumbnail ()
 
 getThumbnailHeight ()
 
 getThumbnailWidth ()
 
 getTitle ()
 
 getTotalAwardsReceived ()
 
 getUps ()
 
 getUrl ()
 
 getUserReports ()
 
 getViewCount ()
 
 getVisited ()
 
 getWhitelistStatus ()
 
 getWls ()
 
- Public Member Functions inherited from snuze\Reddit\Thing\Thing
 __construct (string $kind)
 
 _getSourceJson ()
 
 getId ()
 
 getKind ()
 
 getCreated ()
 
 getCreatedUtc ()
 
 getFullname ()
 
 toJson ()
 
 fromJson (string $json)
 
- Public Member Functions inherited from snuze\SnuzeObject
 __construct (array $args=null)
 
 _getSnuzeId ()
 
 _getSnuzeClass ()
 
 _ident ()
 

Protected Member Functions

 setAllAwardings (array $allAwardings)
 
 setAllowLiveComments (bool $allowLiveComments)
 
 setApprovedAtUtc (float $approvedAtUtc=null)
 
 setApprovedBy (string $approvedBy=null)
 
 setArchived (bool $archived)
 
 setAuthor (string $author)
 
 setAuthorCakeday (bool $authorCakeday=null)
 
 setAuthorFlairBackgroundColor (string $authorFlairBackgroundColor=null)
 
 setAuthorFlairCssClass (string $authorFlairCssClass=null)
 
 setAuthorFlairRichtext (array $authorFlairRichtext)
 
 setAuthorFlairTemplateId (string $authorFlairTemplateId=null)
 
 setAuthorFlairText (string $authorFlairText=null)
 
 setAuthorFlairTextColor (string $authorFlairTextColor=null)
 
 setAuthorFlairType (string $authorFlairType)
 
 setAuthorFullname (string $authorFullname)
 
 setAuthorPatreonFlair (bool $authorPatreonFlair)
 
 setBannedAtUtc (int $bannedAtUtc=null)
 
 setBannedBy ($bannedBy=null)
 
 setCanGild (bool $canGild)
 
 setCanModPost (bool $canModPost)
 
 setCategory (string $category=null)
 
 setClicked (bool $clicked)
 
 setCollections (array $collections=null)
 
 setContentCategories (array $contentCategories=null)
 
 setContestMode (bool $contestMode)
 
 setCrosspostParent (string $crosspostParent=null)
 
 setCrosspostParentList (array $crosspostParentList=null)
 
 setDiscussionType (string $discussionType=null)
 
 setDistinguished (string $distinguished)
 
 setDomain (string $domain)
 
 setDowns (int $downs)
 
 setEdited ($edited)
 
 setGilded (int $gilded)
 
 setGildings (array $gildings)
 
 setHidden (bool $hidden)
 
 setHideScore (bool $hideScore)
 
 setIsCrosspostable (bool $isCrosspostable)
 
 setIsMeta (bool $isMeta)
 
 setIsOriginalContent (bool $isOriginalContent)
 
 setIsRedditMediaDomain (bool $isRedditMediaDomain)
 
 setIsRobotIndexable (bool $isRobotIndexable)
 
 setIsSelf (bool $isSelf)
 
 setIsVideo (bool $isVideo)
 
 setLikes (bool $likes=null)
 
 setLinkFlairBackgroundColor (string $linkFlairBackgroundColor)
 
 setLinkFlairCssClass (string $linkFlairCssClass=null)
 
 setLinkFlairRichtext (array $linkFlairRichtext)
 
 setLinkFlairTemplateId (string $linkFlairTemplateId=null)
 
 setLinkFlairText (string $linkFlairText)
 
 setLinkFlairTextColor (string $linkFlairTextColor)
 
 setLinkFlairType (string $linkFlairType)
 
 setLocked (bool $locked)
 
 setMedia (array $media=null)
 
 setMediaEmbed (array $mediaEmbed)
 
 setMediaMetadata (array $mediaMetadata=null)
 
 setMediaOnly (bool $mediaOnly)
 
 setModNote (string $modNote=null)
 
 setModReasonBy (string $modReasonBy=null)
 
 setModReasonTitle (string $modReasonTitle=null)
 
 setModReports (array $modReports)
 
 setName (string $name)
 
 setNoFollow (bool $noFollow)
 
 setNumComments (int $numComments)
 
 setNumCrossposts (int $numCrossposts)
 
 setNumReports (int $numReports=null)
 
 setOver18 (bool $over18)
 
 setParentWhitelistStatus (string $parentWhitelistStatus)
 
 setPermalink (string $permalink)
 
 setPinned (bool $pinned)
 
 setPostHint (string $postHint)
 
 setPreview (array $preview)
 
 setPwls (int $pwls)
 
 setQuarantine (bool $quarantine)
 
 setRemovalReason (string $removalReason=null)
 
 setReportReasons (array $reportReasons)
 
 setSaved (bool $saved)
 
 setScore (int $score)
 
 setSecureMedia (array $secureMedia=null)
 
 setSecureMediaEmbed (array $secureMediaEmbed)
 
 setSelftext (string $selftext)
 
 setSelftextHtml (string $selftextHtml)
 
 setSendReplies (bool $sendReplies)
 
 setSpoiler (bool $spoiler)
 
 setStickied (bool $stickied)
 
 setSubreddit (string $subreddit)
 
 setSubredditId (string $subredditId)
 
 setSubredditNamePrefixed (string $subredditNamePrefixed)
 
 setSubredditSubscribers (int $subredditSubscribers)
 
 setSubredditType (string $subredditType)
 
 setSuggestedSort (string $suggestedSort=null)
 
 setThumbnail (string $thumbnail)
 
 setThumbnailHeight ($thumbnailHeight=null)
 
 setThumbnailWidth ($thumbnailWidth=null)
 
 setTitle (string $title)
 
 setTotalAwardsReceived (int $totalAwardsReceived)
 
 setUps (int $ups)
 
 setUrl (string $url)
 
 setUserReports (array $userReports)
 
 setViewCount (int $viewCount=null)
 
 setVisited (bool $visited)
 
 setWhitelistStatus (string $whitelistStatus)
 
 setWls (int $wls)
 
- Protected Member Functions inherited from snuze\Reddit\Thing\Thing
 setId (string $id)
 
 setKind (string $kind)
 
 setCreated (float $created)
 
 setCreatedUtc (float $createdUtc)
 
 getPropertyTranslationMap ()
 
- Protected Member Functions inherited from snuze\SnuzeObject
 debug (string $message, bool $echo=false)
 
 info (string $message, bool $echo=false)
 
 warning (string $message, bool $echo=false)
 
 error (string $message, bool $echo=false)
 

Protected Attributes

 $allAwardings = []
 
 $allowLiveComments = true
 
 $approved = null
 
 $approvedAtUtc = null
 
 $approvedBy = null
 
 $archived = false
 
 $author = ''
 
 $authorCakeday = null
 
 $authorFlairBackgroundColor = null
 
 $authorFlairCssClass = null
 
 $authorFlairRichtext = []
 
 $authorFlairTemplateId = null
 
 $authorFlairText = null
 
 $authorFlairTextColor = null
 
 $authorFlairType = ''
 
 $authorFullname = ''
 
 $authorPatreonFlair = false
 
 $bannedAtUtc = null
 
 $bannedBy = null
 
 $canGild = true
 
 $canModPost = false
 
 $category = null
 
 $clicked = false
 
 $collections = null
 
 $contentCategories = null
 
 $contestMode = false
 
 $crosspostParent = null
 
 $crosspostParentList = null
 
 $discussionType = null
 
 $distinguished = ''
 
 $domain = ''
 
 $downs = 0
 
 $edited = false
 
 $eventEnd = null
 
 $eventIsLive = null
 
 $eventStart = null
 
 $gilded = 0
 
 $gildings = []
 
 $hidden = false
 
 $hideScore = false
 
 $ignoreReports = null
 
 $isCrosspostable = true
 
 $isMeta = false
 
 $isOriginalContent = false
 
 $isRedditMediaDomain = false
 
 $isRobotIndexable = true
 
 $isSelf = false
 
 $isVideo = false
 
 $likes = null
 
 $linkFlairBackgroundColor = ''
 
 $linkFlairCssClass = null
 
 $linkFlairRichtext = []
 
 $linkFlairTemplateId = null
 
 $linkFlairText = ''
 
 $linkFlairTextColor = ''
 
 $linkFlairType = ''
 
 $locked = false
 
 $media = null
 
 $mediaEmbed = []
 
 $mediaMetadata = null
 
 $mediaOnly = false
 
 $modNote = null
 
 $modReasonBy = null
 
 $modReasonTitle = null
 
 $modReports = []
 
 $name = ''
 
 $noFollow = false
 
 $numComments = 0
 
 $numCrossposts = 0
 
 $numReports = null
 
 $over18 = false
 
 $parentWhitelistStatus = ''
 
 $permalink = ''
 
 $pinned = false
 
 $postHint = ''
 
 $preview = []
 
 $pwls = 0
 
 $quarantine = false
 
 $removalReason = null
 
 $removed = null
 
 $reportReasons = null
 
 $rteMode = null
 
 $saved = false
 
 $score = 0
 
 $secureMedia = null
 
 $secureMediaEmbed = []
 
 $selftext = ''
 
 $selftextHtml = ''
 
 $sendReplies = false
 
 $spam = null
 
 $spoiler = false
 
 $stewardReports = []
 
 $stickied = false
 
 $subreddit = ''
 
 $subredditId = ''
 
 $subredditNamePrefixed = ''
 
 $subredditSubscribers = 0
 
 $subredditType = ''
 
 $suggestedSort = null
 
 $thumbnail = ''
 
 $thumbnailHeight = null
 
 $thumbnailWidth = null
 
 $title = ''
 
 $totalAwardsReceived = 0
 
 $ups = 0
 
 $url = ''
 
 $userReports = []
 
 $viewCount = null
 
 $visited = false
 
 $whitelistStatus = ''
 
 $wls = 0
 
- Protected Attributes inherited from snuze\Reddit\Thing\Thing
 $_kind = null
 
 $_propertyNames = []
 
 $_propertyTranslationRegex = '|([a-z])([A-Z0-9])|'
 
 $_sourceJson = ''
 
 $id = null
 
 $created = 0.0
 
 $createdUtc = 0.0
 
- Protected Attributes inherited from snuze\SnuzeObject
 $_snuzeId = null
 
 $_snuzeClass = null
 

Additional Inherited Members

- Static Public Member Functions inherited from snuze\Reddit\Thing\Thing
static getValidKinds ()
 
- Public Attributes inherited from snuze\Reddit\Thing\Thing
const KIND_COMMENT = 't1'
 
const KIND_ACCOUNT = 't2'
 
const KIND_LINK = 't3'
 
const KIND_MESSAGE = 't4'
 
const KIND_SUBREDDIT = 't5'
 
const KIND_AWARD = 't6'
 
const REGEX_VALID_ID = '|^[a-z0-9]{1,13}$|i'
 

Detailed Description

The Link class represents the significant properties of a link, otherwise known as a submission, post, or thread. An attempt has been made to map all fields supplied by the API, regardless of their utility (or lack thereof).

Implementation warning: Array properties are currently populated as-is, without any further processing. Calling their getters will return an array holding key/value pairs defining the property. This is subject to change in a future major version, such that some other value(s) may be returned instead.


This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun.nosp@m.@sha.nosp@m.unc.c.nosp@m.om https://shaunc.com/ Repository: https://github.com/snuze/snuze/ Documentation: https://snuze.shaunc.com/

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Constructor & Destructor Documentation

◆ __construct()

snuze\Reddit\Thing\Link::__construct ( )

Constructor.

References snuze\Reddit\Thing\Thing\KIND_LINK.

Member Function Documentation

◆ getAllAwardings()

snuze\Reddit\Thing\Link::getAllAwardings ( )

Get an array defining the type and quantity of all awards (gold, silver, platinum...) this link has received.

Returns
array

◆ getAllowLiveComments()

snuze\Reddit\Thing\Link::getAllowLiveComments ( )

Get whether or not comments on this link can be sorted by "live," which is an experimental feature.

Returns
bool

◆ getApproved()

snuze\Reddit\Thing\Link::getApproved ( )

Get whether or not this link was manually approved by a moderator.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
bool|null

◆ getApprovedAtUtc()

snuze\Reddit\Thing\Link::getApprovedAtUtc ( )

If this link was manually approved by a moderator, get the unix epoch at which that occurred, else null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
float|null

◆ getApprovedBy()

snuze\Reddit\Thing\Link::getApprovedBy ( )

If this link was approved by a moderator, get the username of the mod who approved it, else null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
string|null

◆ getArchived()

snuze\Reddit\Thing\Link::getArchived ( )

Get whether or not this link is archived and can no longer be voted or commented on.

Returns
bool

◆ getAuthor()

snuze\Reddit\Thing\Link::getAuthor ( )

Get the username of the Reddit account that submitted this link.

Returns
string

◆ getAuthorCakeday()

snuze\Reddit\Thing\Link::getAuthorCakeday ( )

Get whether or not the "cake day" flair should decorate this link to celebrate its author's Reddit birthday.

This property is transient and will only be true if the link is fetched during the duration of its author's cake day.

Returns
bool|null

◆ getAuthorFlairBackgroundColor()

snuze\Reddit\Thing\Link::getAuthorFlairBackgroundColor ( )

Get the HTML hex color code for the author's user flair background, if any. The literal string "transparent" has also been observed in this property.

Returns
string|null

◆ getAuthorFlairCssClass()

snuze\Reddit\Thing\Link::getAuthorFlairCssClass ( )

Get the CSS class corresponding to the author's user flair, if any

Returns
string|null

◆ getAuthorFlairRichtext()

snuze\Reddit\Thing\Link::getAuthorFlairRichtext ( )

Get the array containing the elements that define the author's user flair, if any.

Returns
array

◆ getAuthorFlairTemplateId()

snuze\Reddit\Thing\Link::getAuthorFlairTemplateId ( )

Get the 36-character UUID of the author's user flair template, if any

Returns
string|null

◆ getAuthorFlairText()

snuze\Reddit\Thing\Link::getAuthorFlairText ( )

Get the author's user flair text, if any

Returns
string|null

◆ getAuthorFlairTextColor()

snuze\Reddit\Thing\Link::getAuthorFlairTextColor ( )

Get the color, either "dark" or "light", of the author's user flair text, if any

Returns
string|null

◆ getAuthorFlairType()

snuze\Reddit\Thing\Link::getAuthorFlairType ( )

Get the author's user flair type, if any; e.g. "text" or "richtext"

Returns
string

◆ getAuthorFullname()

snuze\Reddit\Thing\Link::getAuthorFullname ( )

Get the Reddit internal "thing" fullname of the author, e.g. "t2_bva6"

Returns
string

◆ getAuthorPatreonFlair()

snuze\Reddit\Thing\Link::getAuthorPatreonFlair ( )

Get whether or not the author is a patron (via Patreon) of the subreddit where this link is posted, granting them special flair

Returns
bool

◆ getBannedAtUtc()

snuze\Reddit\Thing\Link::getBannedAtUtc ( )

If this link was removed by a moderator, get the unix epoch at which this occurred, else null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
int|null

◆ getBannedBy()

snuze\Reddit\Thing\Link::getBannedBy ( )

If this link was removed by a moderator, get the username of the mod who removed it. If this link was removed by the system (e.g. flagged as spam) but that decision hasn't been confirmed by a moderator, returns the literal string '[auto]'. If the link has not been removed either way, returns null.

This is a mutant field. When a link is removed by a human moderator, Reddit sends that mod's username. When a link is removed by the system, e.g. flagged as spam, Reddit sends boolean true. I had to settle on one datatype, so I went with a string and picked the '[auto]' value to distinguish unconfirmed automated removals.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
string|null

◆ getCanGild()

snuze\Reddit\Thing\Link::getCanGild ( )

Get whether or not the link is eligible for gilding by the currently authenticated user. (You can't gild your own links.)

Returns
bool

◆ getCanModPost()

snuze\Reddit\Thing\Link::getCanModPost ( )

Get whether or not the currently authenticated user is permitted to moderate this link.

Returns
bool

◆ getCategory()

snuze\Reddit\Thing\Link::getCategory ( )

Get the category name, if any, assigned to this link.

Returns
string|null

◆ getClicked()

snuze\Reddit\Thing\Link::getClicked ( )

Get whether or not the currently authenticated user has opened this link, if the user has the "Remember what links you've visited across computers" preference enabled (?) Not entirely sure on this.

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getCollections()

snuze\Reddit\Thing\Link::getCollections ( )

If this link is a collection, get the array that defines the other links in the collection, else null

Returns
array|null

◆ getContentCategories()

snuze\Reddit\Thing\Link::getContentCategories ( )

Get an array that defines this link's content categories, if any are assigned

Returns
array|null

◆ getContestMode()

snuze\Reddit\Thing\Link::getContestMode ( )

Get whether or not this link has been designated as being in contest mode for purposes of comment display

Returns
bool

◆ getCrosspostParent()

snuze\Reddit\Thing\Link::getCrosspostParent ( )

If this link is a crosspost, get the Reddit internal fullname of the original link e.g. "t3_clcb1h", else null

Returns
string|null

◆ getCrosspostParentList()

snuze\Reddit\Thing\Link::getCrosspostParentList ( )

If this link is a crosspost, get an array defining the significant properties of the original link, else null

Returns
array|null

◆ getDiscussionType()

snuze\Reddit\Thing\Link::getDiscussionType ( )

Get the discussion type for this link's comment thread, if any. If the link was created as a chat post (e.g. "t3_cmhugu"), this will be set to "CHAT"

Returns
string|null

◆ getDistinguished()

snuze\Reddit\Thing\Link::getDistinguished ( )

Get the type of distinguishment set on this link (e.g. 'moderator', 'admin', 'special'), if any

Returns
string

◆ getDomain()

snuze\Reddit\Thing\Link::getDomain ( )

Get the domain this link points to. For text-only self posts, this will be the string 'self.' followed by the subreddit name.

Returns
string

◆ getDowns()

snuze\Reddit\Thing\Link::getDowns ( )

Get the number of downvotes that have been recorded on this link. This is generally not provided by the API; instead, refer to "ups" and "score"

Returns
int
See also
getScore()
getUps()

◆ getEdited()

snuze\Reddit\Thing\Link::getEdited ( )

Get the unix epoch timestamp at which this link was edited, or 0.0 if it hasn't been edited.

This is a mutant field. If a link has been edited, Reddit returns the epoch timestamp as a float. If it hasn't been edited, Reddit returns boolean false. I had to settle on one datatype, so float it is.

Returns
float

◆ getEventEnd()

snuze\Reddit\Thing\Link::getEventEnd ( )

If this link is marked as an event, get the unix epoch at which the event is scheduled to end, else null

Returns
float|null

◆ getEventIsLive()

snuze\Reddit\Thing\Link::getEventIsLive ( )

If this link is marked as an event, get whether or not it's currently active at the time the link was fetched

Returns
bool|null

◆ getEventStart()

snuze\Reddit\Thing\Link::getEventStart ( )

If this link is marked as an event, get the unix epoch at which the event is scheduled to begin, else null

Returns
float|null

◆ getGilded()

snuze\Reddit\Thing\Link::getGilded ( )

Get the number of times this link has been gilded

Returns
int

◆ getGildings()

snuze\Reddit\Thing\Link::getGildings ( )

Get an array that defines the gildings for this link

Returns
array

◆ getHidden()

snuze\Reddit\Thing\Link::getHidden ( )

Get whether or not the currently authenticated user has hidden this link

Returns
bool

◆ getHideScore()

snuze\Reddit\Thing\Link::getHideScore ( )

Get whether or not the vote score of this link was hidden at the time the link was fetched.

Returns
bool

◆ getIgnoreReports()

snuze\Reddit\Thing\Link::getIgnoreReports ( )

Get whether or not a moderator has set the "ignore reports" flag on this link.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
bool|null

◆ getIsCrosspostable()

snuze\Reddit\Thing\Link::getIsCrosspostable ( )

Get whether or not this link is eligible to be crossposted to another subreddit.

Returns
bool

◆ getIsMeta()

snuze\Reddit\Thing\Link::getIsMeta ( )

Get whether or not this link is marked as a meta-post (?)

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getIsOriginalContent()

snuze\Reddit\Thing\Link::getIsOriginalContent ( )

Get whether or not this link is marked with the "OC" tag

Returns
bool

◆ getIsRedditMediaDomain()

snuze\Reddit\Thing\Link::getIsRedditMediaDomain ( )

Get whether or not the link target points to a Reddit-owned domain

Returns
bool

◆ getIsRobotIndexable()

snuze\Reddit\Thing\Link::getIsRobotIndexable ( )

Get whether or not this link is eligible to be indexed by search engines. When this is false, the link's page will have a <meta name="robots" content="noindex,nofollow"> tag added to it.

Returns
bool

◆ getIsSelf()

snuze\Reddit\Thing\Link::getIsSelf ( )

Get whether or not this link is a self (text-only) post.

Returns
bool

◆ getIsVideo()

snuze\Reddit\Thing\Link::getIsVideo ( )

Get whether or not this link is a video that was uploaded directly to Reddit and is hosted at v.redd.it

Returns
bool

◆ getLikes()

snuze\Reddit\Thing\Link::getLikes ( )

Get whether or not the currently authenticated user has voted on this link. A value of true indicates an upvote, a value of false indicates a downvote, a null value indicates no vote.

Returns
bool|null

◆ getLinkFlairBackgroundColor()

snuze\Reddit\Thing\Link::getLinkFlairBackgroundColor ( )

Get the HTML hex color code for the link's flair background, if any

Returns
string

◆ getLinkFlairCssClass()

snuze\Reddit\Thing\Link::getLinkFlairCssClass ( )

Get the CSS class corresponding to the link's flair, if any

Returns
string|null

◆ getLinkFlairRichtext()

snuze\Reddit\Thing\Link::getLinkFlairRichtext ( )

Get the array containing the elements that define the link's flair, if any

Returns
array

◆ getLinkFlairTemplateId()

snuze\Reddit\Thing\Link::getLinkFlairTemplateId ( )

Get the 36-character UUID of the link's flair template, if any

Returns
string|null

◆ getLinkFlairText()

snuze\Reddit\Thing\Link::getLinkFlairText ( )

Get the link's flair text, if any

Returns
string

◆ getLinkFlairTextColor()

snuze\Reddit\Thing\Link::getLinkFlairTextColor ( )

Get the color, either "dark" or "light", of the link's flair text, if any

Returns
string

◆ getLinkFlairType()

snuze\Reddit\Thing\Link::getLinkFlairType ( )

Get the link's flair type, if any; e.g. "text" or "richtext"

Returns
string

◆ getLocked()

snuze\Reddit\Thing\Link::getLocked ( )

Get whether or not this link has been locked, preventing further comments from being posted

Returns
bool

◆ getMedia()

snuze\Reddit\Thing\Link::getMedia ( )

Get an array defining any recognized media this link points to. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.

Returns
array|null

◆ getMediaEmbed()

snuze\Reddit\Thing\Link::getMediaEmbed ( )

Get an array defining the HTML properties required to embed recognized media objects

Returns
array
See also
getMedia()

◆ getMediaMetadata()

snuze\Reddit\Thing\Link::getMediaMetadata ( )

Get an array defining any recognized media that was linked to within the text (self post) portion of this link. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.

Returns
array|null

◆ getMediaOnly()

snuze\Reddit\Thing\Link::getMediaOnly ( )

Get whether or not this link contains media only (?) This hasn't been observed set to true.

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getModNote()

snuze\Reddit\Thing\Link::getModNote ( )

If this link was removed by a moderator, and the mod filled out the "Add a removal reason" dialog, get the text supplied by the moderator. If this link hasn't been removed by a moderator or if no reason was given, returns null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
string|null

◆ getModReasonBy()

snuze\Reddit\Thing\Link::getModReasonBy ( )

If this link was removed by a moderator, and the mod filled out the "Add a removal reason" dialog, get the username of that moderator. If this link hasn't been removed by a moderator or if no reason was given, returns null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
string|null

◆ getModReasonTitle()

snuze\Reddit\Thing\Link::getModReasonTitle ( )

If this link was removed by a moderator, and the mod chose a canned reason from the "Add a removal reason" dialog, get the title of the canned reason. If this link hasn't been removed by a moderator, or if the mod used a custom freeform removal message instead of a canned one, returns null.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
string|null

◆ getModReports()

snuze\Reddit\Thing\Link::getModReports ( )

Get an array defining any reports that have been lodged against this link by moderators of the subreddit where it resides

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
array
See also
getStewardReports()
getUserReports()

◆ getName()

snuze\Reddit\Thing\Link::getName ( )

Get the Reddit internal "thing" fullname of this link, e.g. "t3_cjqwv5"

Returns
string

◆ getNoFollow()

snuze\Reddit\Thing\Link::getNoFollow ( )

Get whether or not this link has a "no follow" flag set (?)

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getNumComments()

snuze\Reddit\Thing\Link::getNumComments ( )

Get the number of comments in this link's comment thread

Returns
int

◆ getNumCrossposts()

snuze\Reddit\Thing\Link::getNumCrossposts ( )

Get the number of times this link has been crossposted to another subreddit

Returns
int

◆ getNumReports()

snuze\Reddit\Thing\Link::getNumReports ( )

Get the number of user reports that have been lodged against this link.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
int|null

◆ getOver18()

snuze\Reddit\Thing\Link::getOver18 ( )

Get whether or not this link is marked with the "NSFW" tag

Returns
bool

◆ getParentWhitelistStatus()

snuze\Reddit\Thing\Link::getParentWhitelistStatus ( )

Get the advertising whitelist status for this link's subreddit, if set. This indicates which types of ads are eligible to be displayed in the subreddit. The link itself may have a different whitelist status; this is typically the case when a link is marked NSFW but its subreddit is not marked NSFW.

Returns
string
See also
getWhitelistStatus()

◆ getPermalink()

snuze\Reddit\Thing\Link::getPermalink ( )

Get the portion of this link's permanent URL relative to https://reddit.com/

Returns
string

◆ getPinned()

snuze\Reddit\Thing\Link::getPinned ( )

Get whether or not this link is pinned

Returns
bool

◆ getPostHint()

snuze\Reddit\Thing\Link::getPostHint ( )

Get the post type hint (e.g. "image", "rich:video") set for this link, if any.

Returns
string

◆ getPreview()

snuze\Reddit\Thing\Link::getPreview ( )

Get an array defining the different preview images available for this link, if any.

Returns
array

◆ getPwls()

snuze\Reddit\Thing\Link::getPwls ( )

Get the numeric whitelist status key for this link's subreddit, if set. A text version of the corresponding whitelist status is available in getParentWhitelistStatus()

Returns
int
See also
getParentWhitelistStatus()

◆ getQuarantine()

snuze\Reddit\Thing\Link::getQuarantine ( )

Get whether or not this link is in a quarantined subreddit

Returns
bool

◆ getRemovalReason()

snuze\Reddit\Thing\Link::getRemovalReason ( )

Get the reason this link was removed (?)

When a link is removed by a moderator, the reason appears in mod_note; the removal_reason field has not been observed to be populated

Returns
string|null
Todo:
verify what exactly this corresponds to

◆ getRemoved()

snuze\Reddit\Thing\Link::getRemoved ( )

Get whether or not this link has been removed by a moderator

Returns
bool|null

◆ getReportReasons()

snuze\Reddit\Thing\Link::getReportReasons ( )

Per Reddit, this is deprecated and you should use mod_reports and user_reports instead.

Deprecated:
Returns
array|null
See also
getModReports()
getUserReports()

◆ getRteMode()

snuze\Reddit\Thing\Link::getRteMode ( )

Get the rich text editor mode (e.g. "markdown") that was used to write the text in this post, if any.

This is an author-only property. To receive an accurate value, the currently authenticated user must be the user who submitted the link.

Returns
type

◆ getSaved()

snuze\Reddit\Thing\Link::getSaved ( )

Get whether or not the currently authenticated user has saved this link

Returns
bool

◆ getScore()

snuze\Reddit\Thing\Link::getScore ( )

Get the vote score of this link

Returns
int

◆ getSecureMedia()

snuze\Reddit\Thing\Link::getSecureMedia ( )

Get an array defining any recognized media this link points to which is served over TLS (https URLs). This may be a subset of getMedia(), or it may be identical, if all of the recognized media is served securely.

Returns
array|null
See also
getMedia()

◆ getSecureMediaEmbed()

snuze\Reddit\Thing\Link::getSecureMediaEmbed ( )

Get an array defining the HTML properties required to embed recognized media objects which are served over TLS (https URLs). This may be a subset of getMediaEmbed(), or it may be identical, if all of the recognized media is served securely.

Returns
array
See also
getMediaEmbed()

◆ getSelftext()

snuze\Reddit\Thing\Link::getSelftext ( )

If this link is a text-only self post, get the text that comprises it

Returns
string

◆ getSelftextHtml()

snuze\Reddit\Thing\Link::getSelftextHtml ( )

If this link is a text-only self post, get the HTML required to render the text that comprises it

Returns
string

◆ getSendReplies()

snuze\Reddit\Thing\Link::getSendReplies ( )

Get whether or not "inbox replies" to the author are enabled on this link

Returns
bool

◆ getSpam()

snuze\Reddit\Thing\Link::getSpam ( )

Get whether or not a moderator has flagged this link as spam.

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
bool|null

◆ getSpoiler()

snuze\Reddit\Thing\Link::getSpoiler ( )

Get whether or not this link is marked with the "spoiler" tag

Returns
bool

◆ getStewardReports()

snuze\Reddit\Thing\Link::getStewardReports ( )

Get an array defining any reports that have been lodged against this link by... stewards? (Can't find an announcement of this as of 20190908)

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
array
See also
getModReports()
getUserReports()
Todo:
verify what exactly this corresponds to

◆ getStickied()

snuze\Reddit\Thing\Link::getStickied ( )

Get whether or not this link is stickied at the top of the subreddit

Returns
bool

◆ getSubreddit()

snuze\Reddit\Thing\Link::getSubreddit ( )

Get the name of the subreddit this link resides in

Returns
string

◆ getSubredditId()

snuze\Reddit\Thing\Link::getSubredditId ( )

Get the Reddit internal "thing" fullname of the subreddit this link resides in, e.g. "t5_2qi1v"

Returns
string

◆ getSubredditNamePrefixed()

snuze\Reddit\Thing\Link::getSubredditNamePrefixed ( )

Get the name of the subreddit this link resides in, with its relative path e.g. "r/funny", or "u/joe" for user profile subreddits

Returns
string

◆ getSubredditSubscribers()

snuze\Reddit\Thing\Link::getSubredditSubscribers ( )

Get the number of subscribers in the subreddit where this link resides

Returns
int

◆ getSubredditType()

snuze\Reddit\Thing\Link::getSubredditType ( )

Get the type of access control enforced on the subreddit where this link resides. This should be one of ['public', 'restricted', 'private', 'employees_only']

Returns
string

◆ getSuggestedSort()

snuze\Reddit\Thing\Link::getSuggestedSort ( )

Get the suggested sort order for comments on this link, if any has been set

Returns
string|null

◆ getThumbnail()

snuze\Reddit\Thing\Link::getThumbnail ( )

Get the URL to the thumbnail image for this link, if any

Returns
string

◆ getThumbnailHeight()

snuze\Reddit\Thing\Link::getThumbnailHeight ( )

Get the thumbnail height pixel value, if any

Returns
int|null

◆ getThumbnailWidth()

snuze\Reddit\Thing\Link::getThumbnailWidth ( )

Get the thumbnail width pixel value, if any

Returns
int|null

◆ getTitle()

snuze\Reddit\Thing\Link::getTitle ( )

Get this link's title

Returns
string

◆ getTotalAwardsReceived()

snuze\Reddit\Thing\Link::getTotalAwardsReceived ( )

Get the total number of awards (gold, platinum, etc.) this link has received

Returns
int

◆ getUps()

snuze\Reddit\Thing\Link::getUps ( )

Get the number of upvotes that have been recorded on this link

Returns
int

◆ getUrl()

snuze\Reddit\Thing\Link::getUrl ( )

Get the URL to the target of this link. Text-only self posts will return a link to their own comment thread.

Returns
string

◆ getUserReports()

snuze\Reddit\Thing\Link::getUserReports ( )

Get an array defining any reports that have been lodged against this link by users. (Reports from moderators are stored separately in mod_reports.)

This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.

Returns
array
See also
getModReports()
getStewardReports()

◆ getViewCount()

snuze\Reddit\Thing\Link::getViewCount ( )

Get the number of times this link has been viewed.

(Or, don't. This attribute is not returned by the API.)

Returns
int|null

◆ getVisited()

snuze\Reddit\Thing\Link::getVisited ( )

Get whether or not the currently authenticated user has visited this link. This will only be true if the user has gold, and has enabled the "remember links I've visited across computers" gold-only preference.

Returns
bool

◆ getWhitelistStatus()

snuze\Reddit\Thing\Link::getWhitelistStatus ( )

Get the advertising whitelist status for this link, if set. This indicates which types of ads are eligible to be displayed.

Returns
string

◆ getWls()

snuze\Reddit\Thing\Link::getWls ( )

Get the numeric whitelist status key, if any. A text version of the corresponding whitelist status is available in getWhitelistStatus()

Returns
int
See also
getWhitelistStatus()

◆ setAllAwardings()

snuze\Reddit\Thing\Link::setAllAwardings ( array  $allAwardings)
protected

Set the array defining the type and quantity of all awards (gold, silver, platinum...) this link has received.

Parameters
array$allAwardings
Returns
$this

◆ setAllowLiveComments()

snuze\Reddit\Thing\Link::setAllowLiveComments ( bool  $allowLiveComments)
protected

Set whether or not comments on this link can be sorted by "live," which is an experimental feature.

Parameters
bool$allowLiveComments
Returns
$this

◆ setApproved()

snuze\Reddit\Thing\Link::setApproved ( bool  $approved = null)

Set whether or not this link was manually approved by a moderator.

Parameters
bool$approved
Returns
$this

◆ setApprovedAtUtc()

snuze\Reddit\Thing\Link::setApprovedAtUtc ( float  $approvedAtUtc = null)
protected

Set the epoch timestamp at which this link was manually approved by a moderator, if that occurred.

Parameters
float$approvedAtUtc
Returns
$this

◆ setApprovedBy()

snuze\Reddit\Thing\Link::setApprovedBy ( string  $approvedBy = null)
protected

Set the username of the moderator who manually approved this link, or null if it wasn't.

Parameters
string$approvedBy
Returns
$this

◆ setArchived()

snuze\Reddit\Thing\Link::setArchived ( bool  $archived)
protected

Set whether or not this link is archived and can no longer be voted or commented on.

Parameters
bool$archived
Returns
$this

◆ setAuthor()

snuze\Reddit\Thing\Link::setAuthor ( string  $author)
protected

Set the username of the Reddit account that submitted this link.

Parameters
string$author
Returns
$this

◆ setAuthorCakeday()

snuze\Reddit\Thing\Link::setAuthorCakeday ( bool  $authorCakeday = null)
protected

Set whether or not the "cake day" flair should decorate this link to celebrate its author's Reddit birthday.

Parameters
bool$authorCakeday
Returns
$this

◆ setAuthorFlairBackgroundColor()

snuze\Reddit\Thing\Link::setAuthorFlairBackgroundColor ( string  $authorFlairBackgroundColor = null)
protected

Set the HTML hex color code for the author's user flair background, if any

Parameters
string$authorFlairBackgroundColor
Returns
$this

◆ setAuthorFlairCssClass()

snuze\Reddit\Thing\Link::setAuthorFlairCssClass ( string  $authorFlairCssClass = null)
protected

Set the CSS class corresponding to the author's user flair, if any

Parameters
string$authorFlairCssClass
Returns
$this

◆ setAuthorFlairRichtext()

snuze\Reddit\Thing\Link::setAuthorFlairRichtext ( array  $authorFlairRichtext)
protected

Set the array containing the elements that define the author's user flair, if any.

Parameters
array$authorFlairRichtext
Returns
$this

◆ setAuthorFlairTemplateId()

snuze\Reddit\Thing\Link::setAuthorFlairTemplateId ( string  $authorFlairTemplateId = null)
protected

Set the 36-character UUID of the author's user flair template, if any

Parameters
string$authorFlairTemplateId
Returns
$this

◆ setAuthorFlairText()

snuze\Reddit\Thing\Link::setAuthorFlairText ( string  $authorFlairText = null)
protected

Set the author's user flair text, if any

Parameters
string$authorFlairText
Returns
$this

◆ setAuthorFlairTextColor()

snuze\Reddit\Thing\Link::setAuthorFlairTextColor ( string  $authorFlairTextColor = null)
protected

Set the color, either "dark" or "light", of the author's user flair text, if any

Parameters
string$authorFlairTextColor
Returns
$this

◆ setAuthorFlairType()

snuze\Reddit\Thing\Link::setAuthorFlairType ( string  $authorFlairType)
protected

Set the author's user flair type, if any; e.g. "text" or "richtext"

Parameters
string$authorFlairType
Returns
$this

◆ setAuthorFullname()

snuze\Reddit\Thing\Link::setAuthorFullname ( string  $authorFullname)
protected

Set the Reddit internal "thing" fullname of the author, e.g. "t2_bva6"

Parameters
string$authorFullname
Returns
$this

◆ setAuthorPatreonFlair()

snuze\Reddit\Thing\Link::setAuthorPatreonFlair ( bool  $authorPatreonFlair)
protected

Set whether or not the author is a patron (via Patreon) of the subreddit where this link is posted, granting them special flair

Parameters
bool$authorPatreonFlair
Returns
$this

◆ setBannedAtUtc()

snuze\Reddit\Thing\Link::setBannedAtUtc ( int  $bannedAtUtc = null)
protected

Set the unix epoch at which this post was removed by a moderator, if that occurred.

Parameters
int$bannedAtUtc
Returns
$this

◆ setBannedBy()

snuze\Reddit\Thing\Link::setBannedBy (   $bannedBy = null)
protected

Set the username of the moderator who removed this link, if that occurred, or the literal string '[auto]' if the link was removed by the system

Parameters
mixed$bannedBy
Returns
$this

◆ setCanGild()

snuze\Reddit\Thing\Link::setCanGild ( bool  $canGild)
protected

Set whether or not the link is eligible for gilding by the currently authenticated user. (You can't gild your own links.)

Parameters
bool$canGild
Returns
$this

◆ setCanModPost()

snuze\Reddit\Thing\Link::setCanModPost ( bool  $canModPost)
protected

Set whether or not the currently authenticated user is permitted to moderate this link.

Parameters
bool$canModPost
Returns
$this

◆ setCategory()

snuze\Reddit\Thing\Link::setCategory ( string  $category = null)
protected

Set the category name, if any, assigned to this link.

Parameters
string$category
Returns
$this

◆ setClicked()

snuze\Reddit\Thing\Link::setClicked ( bool  $clicked)
protected

Set whether or not the currently authenticated user has opened this link, if the user has the "Remember what links you've visited across computers" preference enabled (?) Not entirely sure on this.

Parameters
bool$clicked
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setCollections()

snuze\Reddit\Thing\Link::setCollections ( array  $collections = null)
protected

If this link is a collection, set the array that defines the other links in the collection

Parameters
array$collections
Returns
$this

◆ setContentCategories()

snuze\Reddit\Thing\Link::setContentCategories ( array  $contentCategories = null)
protected

Set an array that defines this link's content categories, if any are assigned

Parameters
array$contentCategories
Returns
$this

◆ setContestMode()

snuze\Reddit\Thing\Link::setContestMode ( bool  $contestMode)
protected

Set whether or not this link has been designated as being in contest mode for purposes of comment display

Parameters
bool$contestMode
Returns
$this

◆ setCrosspostParent()

snuze\Reddit\Thing\Link::setCrosspostParent ( string  $crosspostParent = null)
protected

If this link is a crosspost, set the Reddit internal fullname of the original link

Parameters
string$crosspostParent
Returns
$this

◆ setCrosspostParentList()

snuze\Reddit\Thing\Link::setCrosspostParentList ( array  $crosspostParentList = null)
protected

If this link is a crosspost, set an array defining the significant properties of the original link

Parameters
array$crosspostParentList
Returns
$this

◆ setDiscussionType()

snuze\Reddit\Thing\Link::setDiscussionType ( string  $discussionType = null)
protected

Set the discussion type for this link's comment thread, if any

Parameters
string$discussionType
Returns
$this

◆ setDistinguished()

snuze\Reddit\Thing\Link::setDistinguished ( string  $distinguished)
protected

Set the type of distinguishment set on this link (e.g. 'moderator', 'admin', 'special'), if any

Parameters
string$distinguished
Returns
$this

◆ setDomain()

snuze\Reddit\Thing\Link::setDomain ( string  $domain)
protected

Set the domain this link points to. For text-only self posts, this will be the string 'self.' followed by the subreddit name.

Parameters
string$domain
Returns
$this

◆ setDowns()

snuze\Reddit\Thing\Link::setDowns ( int  $downs)
protected

Set the number of downvotes that have been recorded on this link

Parameters
int$downs
Returns
$this

◆ setEdited()

snuze\Reddit\Thing\Link::setEdited (   $edited)
protected

Set the unix epoch timestamp at which this link was edited, or 0.0 if it hasn't been edited.

This is a mutant field. If a link has been edited, Reddit returns the epoch timestamp as a float. If it hasn't been edited, Reddit returns boolean false. I had to settle on one datatype, so float it is.

Parameters
type$edited
Returns
$this

◆ setEventEnd()

snuze\Reddit\Thing\Link::setEventEnd ( float  $eventEnd = null)

If this link is marked as an event, set the unix epoch at which the event is scheduled to end, else null

Parameters
float$eventEnd
Returns
$this

◆ setEventIsLive()

snuze\Reddit\Thing\Link::setEventIsLive ( bool  $eventIsLive = null)

If this link is marked as an event, set whether or not it's currently active at the time the link was fetched

Parameters
bool$eventIsLive
Returns
$this

◆ setEventStart()

snuze\Reddit\Thing\Link::setEventStart ( float  $eventStart = null)

If this link is marked as an event, set the unix epoch at which the event is scheduled to begin, else null

Parameters
float$eventStart
Returns
$this

◆ setGilded()

snuze\Reddit\Thing\Link::setGilded ( int  $gilded)
protected

Set the number of times this link has been gilded

Parameters
int$gilded
Returns
$this

◆ setGildings()

snuze\Reddit\Thing\Link::setGildings ( array  $gildings)
protected

Set an array that defines the gildings for this link

Parameters
array$gildings
Returns
$this

◆ setHidden()

snuze\Reddit\Thing\Link::setHidden ( bool  $hidden)
protected

Set whether or not the currently authenticated user has hidden this link

Parameters
bool$hidden
Returns
$this

◆ setHideScore()

snuze\Reddit\Thing\Link::setHideScore ( bool  $hideScore)
protected

Set whether or not the vote score of this link was hidden at the time the link was fetched.

Parameters
bool$hideScore
Returns
$this

◆ setIgnoreReports()

snuze\Reddit\Thing\Link::setIgnoreReports ( bool  $ignoreReports = null)

Set whether or not a moderator has set the "ignore reports" flag on this link.

Parameters
bool$ignoreReports
Returns
$this

◆ setIsCrosspostable()

snuze\Reddit\Thing\Link::setIsCrosspostable ( bool  $isCrosspostable)
protected

Set whether or not this link is eligible to be crossposted to another subreddit.

Parameters
bool$isCrosspostable
Returns
$this

◆ setIsMeta()

snuze\Reddit\Thing\Link::setIsMeta ( bool  $isMeta)
protected

Set whether or not this link is marked as a meta-post (?)

Parameters
bool$isMeta
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setIsOriginalContent()

snuze\Reddit\Thing\Link::setIsOriginalContent ( bool  $isOriginalContent)
protected

Set whether or not this link is marked with the "OC" tag

Parameters
bool$isOriginalContent
Returns
$this

◆ setIsRedditMediaDomain()

snuze\Reddit\Thing\Link::setIsRedditMediaDomain ( bool  $isRedditMediaDomain)
protected

Set whether or not the link target points to a Reddit-owned domain

Parameters
bool$isRedditMediaDomain
Returns
$this

◆ setIsRobotIndexable()

snuze\Reddit\Thing\Link::setIsRobotIndexable ( bool  $isRobotIndexable)
protected

Set whether or not this link is eligible to be indexed by search engines.

Parameters
bool$isRobotIndexable
Returns
$this

◆ setIsSelf()

snuze\Reddit\Thing\Link::setIsSelf ( bool  $isSelf)
protected

Set whether or not this link is a self (text-only) post.

Parameters
bool$isSelf
Returns
$this

◆ setIsVideo()

snuze\Reddit\Thing\Link::setIsVideo ( bool  $isVideo)
protected

Set whether or not this link is a video that was uploaded directly to Reddit and is hosted at v.redd.it

Parameters
bool$isVideo
Returns
$this

◆ setLikes()

snuze\Reddit\Thing\Link::setLikes ( bool  $likes = null)
protected

Set whether or not the currently authenticated user has voted on this link. A value of true indicates an upvote, a value of false indicates a downvote, a null value indicates no vote.

Parameters
bool$likes
Returns
$this

◆ setLinkFlairBackgroundColor()

snuze\Reddit\Thing\Link::setLinkFlairBackgroundColor ( string  $linkFlairBackgroundColor)
protected

Set the HTML hex color code for the link's flair background, if any

Parameters
string$linkFlairBackgroundColor
Returns
$this

◆ setLinkFlairCssClass()

snuze\Reddit\Thing\Link::setLinkFlairCssClass ( string  $linkFlairCssClass = null)
protected

Set the CSS class corresponding to the link's flair, if any

Parameters
string$linkFlairCssClass
Returns
$this

◆ setLinkFlairRichtext()

snuze\Reddit\Thing\Link::setLinkFlairRichtext ( array  $linkFlairRichtext)
protected

Set the array containing the elements that define the link's flair, if any

Parameters
array$linkFlairRichtext
Returns
$this

◆ setLinkFlairTemplateId()

snuze\Reddit\Thing\Link::setLinkFlairTemplateId ( string  $linkFlairTemplateId = null)
protected

Set the 36-character UUID of the link's flair template, if any

Parameters
string$linkFlairTemplateId
Returns
$this

◆ setLinkFlairText()

snuze\Reddit\Thing\Link::setLinkFlairText ( string  $linkFlairText)
protected

Set the link's flair text, if any

Parameters
string$linkFlairText
Returns
$this

◆ setLinkFlairTextColor()

snuze\Reddit\Thing\Link::setLinkFlairTextColor ( string  $linkFlairTextColor)
protected

Set the color, either "dark" or "light", of the link's flair text, if any

Parameters
string$linkFlairTextColor
Returns
$this

◆ setLinkFlairType()

snuze\Reddit\Thing\Link::setLinkFlairType ( string  $linkFlairType)
protected

Set the link's flair type, if any; e.g. "text" or "richtext"

Parameters
string$linkFlairType
Returns
$this

◆ setLocked()

snuze\Reddit\Thing\Link::setLocked ( bool  $locked)
protected

Get whether or not this link has been locked, preventing further comments from being posted

Parameters
bool$locked
Returns
$this

◆ setMedia()

snuze\Reddit\Thing\Link::setMedia ( array  $media = null)
protected

Set an array defining any recognized media this link points to. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.

Parameters
array$media
Returns
$this

◆ setMediaEmbed()

snuze\Reddit\Thing\Link::setMediaEmbed ( array  $mediaEmbed)
protected

Set an array defining the HTML properties required to embed recognized media objects

Parameters
array$mediaEmbed
Returns
$this
See also
setMedia()

◆ setMediaMetadata()

snuze\Reddit\Thing\Link::setMediaMetadata ( array  $mediaMetadata = null)
protected

Set an array defining any recognized media that was linked to within the text (self post) portion of this link. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.

Parameters
array$mediaMetadata
Returns
$this

◆ setMediaOnly()

snuze\Reddit\Thing\Link::setMediaOnly ( bool  $mediaOnly)
protected

Set whether or not this link contains media only (?) This hasn't been observed set to true.

Parameters
bool$mediaOnly
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setModNote()

snuze\Reddit\Thing\Link::setModNote ( string  $modNote = null)
protected

Set the "removal reason" note supplied by a moderator for removing this link, if any

Parameters
string$modNote
Returns
$this

◆ setModReasonBy()

snuze\Reddit\Thing\Link::setModReasonBy ( string  $modReasonBy = null)
protected

Set the username of the moderator who wrote the "removal reason," if any

Parameters
string$modReasonBy
Returns
$this

◆ setModReasonTitle()

snuze\Reddit\Thing\Link::setModReasonTitle ( string  $modReasonTitle = null)
protected

Set the title of the canned "removal reason" used when a moderator removed this link, if that applies

Parameters
string$modReasonTitle
Returns
$this

◆ setModReports()

snuze\Reddit\Thing\Link::setModReports ( array  $modReports)
protected

Set an array defining any reports that have been lodged against this link by moderators of the subreddit where it resides

Parameters
array$modReports
Returns
$this

◆ setName()

snuze\Reddit\Thing\Link::setName ( string  $name)
protected

Set the Reddit internal "thing" fullname of this link, e.g. "t3_cjqwv5"

Parameters
string$name
Returns
$this

◆ setNoFollow()

snuze\Reddit\Thing\Link::setNoFollow ( bool  $noFollow)
protected

Set whether or not this link has a "no follow" flag set (?)

Parameters
bool$noFollow
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setNumComments()

snuze\Reddit\Thing\Link::setNumComments ( int  $numComments)
protected

Set the number of comments in this link's comment thread

Parameters
int$numComments
Returns
$this

◆ setNumCrossposts()

snuze\Reddit\Thing\Link::setNumCrossposts ( int  $numCrossposts)
protected

Set the number of times this link has been crossposted to another subreddit

Parameters
int$numCrossposts
Returns
$this

◆ setNumReports()

snuze\Reddit\Thing\Link::setNumReports ( int  $numReports = null)
protected

Set the number of user reports that have been lodged against this link.

Parameters
int$numReports
Returns
$this

◆ setOver18()

snuze\Reddit\Thing\Link::setOver18 ( bool  $over18)
protected

Set whether or not this link is marked with the "NSFW" tag

Parameters
bool$over18
Returns
$this

◆ setParentWhitelistStatus()

snuze\Reddit\Thing\Link::setParentWhitelistStatus ( string  $parentWhitelistStatus)
protected

Set the advertising whitelist status for this link's subreddit, if set.

Parameters
string$parentWhitelistStatus
Returns
$this

◆ setPermalink()

snuze\Reddit\Thing\Link::setPermalink ( string  $permalink)
protected

Set the portion of this link's permanent URL relative to https://reddit.com/

Parameters
string$permalink
Returns
$this

◆ setPinned()

snuze\Reddit\Thing\Link::setPinned ( bool  $pinned)
protected

Set whether or not this link is pinned

Parameters
bool$pinned
Returns
$this

◆ setPostHint()

snuze\Reddit\Thing\Link::setPostHint ( string  $postHint)
protected

Set the post type hint (e.g. "image", "rich:video") set for this link, if any.

Parameters
string$postHint
Returns
$this

◆ setPreview()

snuze\Reddit\Thing\Link::setPreview ( array  $preview)
protected

Set an array defining the different preview images available for this link, if any.

Parameters
array$preview
Returns
$this

◆ setPwls()

snuze\Reddit\Thing\Link::setPwls ( int  $pwls)
protected

Set the numeric whitelist status key for this link's subreddit, if set.

Parameters
int$pwls
Returns
$this

◆ setQuarantine()

snuze\Reddit\Thing\Link::setQuarantine ( bool  $quarantine)
protected

Set whether or not this link is in a quarantined subreddit

Parameters
bool$quarantine
Returns
$this

◆ setRemovalReason()

snuze\Reddit\Thing\Link::setRemovalReason ( string  $removalReason = null)
protected

Set the reason this link was removed (?)

Parameters
string$removalReason
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setRemoved()

snuze\Reddit\Thing\Link::setRemoved ( bool  $removed = null)

Set whether or not this link has been removed by a moderator

Parameters
bool$removed
Returns
$this

◆ setReportReasons()

snuze\Reddit\Thing\Link::setReportReasons ( array  $reportReasons)
protected

Per Reddit, this is deprecated and you should use mod_reports and user_reports instead.

Deprecated:
Parameters
array$reportReasons
Returns
$this
See also
setModReports()
setUserReports()

◆ setRteMode()

snuze\Reddit\Thing\Link::setRteMode (   $rteMode)

Set the rich text editor mode (e.g. "markdown") that was used to write the text in this post, if any.

Parameters
type$rteMode
Returns
$this

◆ setSaved()

snuze\Reddit\Thing\Link::setSaved ( bool  $saved)
protected

Set whether or not the currently authenticated user has saved this link

Parameters
bool$saved
Returns
$this

◆ setScore()

snuze\Reddit\Thing\Link::setScore ( int  $score)
protected

Set the vote score of this link

Parameters
int$score
Returns
$this

◆ setSecureMedia()

snuze\Reddit\Thing\Link::setSecureMedia ( array  $secureMedia = null)
protected

Set an array defining any recognized media this link points to which is served over TLS (https URLs).

Parameters
array$secureMedia
Returns
$this

◆ setSecureMediaEmbed()

snuze\Reddit\Thing\Link::setSecureMediaEmbed ( array  $secureMediaEmbed)
protected

Set an array defining the HTML properties required to embed recognized media objects which are served over TLS (https URLs)

Parameters
array$secureMediaEmbed
Returns
$this

◆ setSelftext()

snuze\Reddit\Thing\Link::setSelftext ( string  $selftext)
protected

If this link is a text-only self post, set the text that comprises it

Parameters
string$selftext
Returns
$this

◆ setSelftextHtml()

snuze\Reddit\Thing\Link::setSelftextHtml ( string  $selftextHtml)
protected

If this link is a text-only self post, set the HTML required to render the text that comprises it

Parameters
string$selftextHtml
Returns
$this

◆ setSendReplies()

snuze\Reddit\Thing\Link::setSendReplies ( bool  $sendReplies)
protected

Set whether or not "inbox replies" to the author are enabled on this link

Parameters
bool$sendReplies
Returns
$this

◆ setSpam()

snuze\Reddit\Thing\Link::setSpam ( bool  $spam = null)

Set whether or not a moderator has flagged this link as spam.

Parameters
bool$spam
Returns
$this

◆ setSpoiler()

snuze\Reddit\Thing\Link::setSpoiler ( bool  $spoiler)
protected

Set whether or not this link is marked with the "spoiler" tag

Parameters
bool$spoiler
Returns
$this

◆ setStewardReports()

snuze\Reddit\Thing\Link::setStewardReports ( array  $stewardReports)

Set an array defining any reports that have been lodged against this link by... stewards? (Can't find an announcement of this as of 20190908)

Parameters
array$stewardReports
Returns
$this
Todo:
verify what exactly this corresponds to

◆ setStickied()

snuze\Reddit\Thing\Link::setStickied ( bool  $stickied)
protected

Set whether or not this link is stickied at the top of the subreddit

Parameters
bool$stickied
Returns
$this

◆ setSubreddit()

snuze\Reddit\Thing\Link::setSubreddit ( string  $subreddit)
protected

Set the name of the subreddit this link resides in

Parameters
string$subreddit
Returns
$this

◆ setSubredditId()

snuze\Reddit\Thing\Link::setSubredditId ( string  $subredditId)
protected

Set the Reddit internal "thing" fullname of the subreddit this link resides in, e.g. "t5_2qi1v"

Parameters
string$subredditId
Returns
$this

◆ setSubredditNamePrefixed()

snuze\Reddit\Thing\Link::setSubredditNamePrefixed ( string  $subredditNamePrefixed)
protected

Set the name of the subreddit this link resides in, with its relative path e.g. "r/funny", or "u/joe" for user profile subreddits

Parameters
string$subredditNamePrefixed
Returns
$this

◆ setSubredditSubscribers()

snuze\Reddit\Thing\Link::setSubredditSubscribers ( int  $subredditSubscribers)
protected

Set the number of subscribers in the subreddit where this link resides

Parameters
int$subredditSubscribers
Returns
$this

◆ setSubredditType()

snuze\Reddit\Thing\Link::setSubredditType ( string  $subredditType)
protected

Set the type of access control enforced on the subreddit where this link resides. This should be one of ['public', 'restricted', 'private', 'employees_only']

Parameters
string$subredditType
Returns
$this

◆ setSuggestedSort()

snuze\Reddit\Thing\Link::setSuggestedSort ( string  $suggestedSort = null)
protected

Set the suggested sort order for comments on this link, if any

Parameters
string$suggestedSort
Returns
$this

◆ setThumbnail()

snuze\Reddit\Thing\Link::setThumbnail ( string  $thumbnail)
protected

Set the URL to the thumbnail image for this link, if any

Parameters
string$thumbnail
Returns
$this

◆ setThumbnailHeight()

snuze\Reddit\Thing\Link::setThumbnailHeight (   $thumbnailHeight = null)
protected

Set the thumbnail height pixel value, if any

Parameters
type$thumbnailHeight
Returns
$this

◆ setThumbnailWidth()

snuze\Reddit\Thing\Link::setThumbnailWidth (   $thumbnailWidth = null)
protected

Set the thumbnail width pixel value, if any

Parameters
type$thumbnailWidth
Returns
$this

◆ setTitle()

snuze\Reddit\Thing\Link::setTitle ( string  $title)
protected

Set this link's title

Parameters
string$title
Returns
$this

◆ setTotalAwardsReceived()

snuze\Reddit\Thing\Link::setTotalAwardsReceived ( int  $totalAwardsReceived)
protected

Set the total number of awards (gold, platinum, etc.) this link has received

Parameters
int$totalAwardsReceived
Returns
$this

◆ setUps()

snuze\Reddit\Thing\Link::setUps ( int  $ups)
protected

Set the number of upvotes that have been recorded on this link

Parameters
int$ups
Returns
$this

◆ setUrl()

snuze\Reddit\Thing\Link::setUrl ( string  $url)
protected

Set the URL to the target of this link.

Parameters
string$url
Returns
$this

◆ setUserReports()

snuze\Reddit\Thing\Link::setUserReports ( array  $userReports)
protected

Set an array defining any reports that have been lodged against this link by users. (Reports from moderators are stored separately in mod_reports.)

Parameters
array$userReports
Returns
$this

◆ setViewCount()

snuze\Reddit\Thing\Link::setViewCount ( int  $viewCount = null)
protected

Set the number of times this link has been viewed.

Parameters
int$viewCount
Returns
$this

◆ setVisited()

snuze\Reddit\Thing\Link::setVisited ( bool  $visited)
protected

Set whether or not the currently authenticated user has visited this link.

Parameters
bool$visited
Returns
$this

◆ setWhitelistStatus()

snuze\Reddit\Thing\Link::setWhitelistStatus ( string  $whitelistStatus)
protected

Set the advertising whitelist status for this link, if set. This indicates which types of ads are eligible to be displayed.

Parameters
string$whitelistStatus
Returns
$this

◆ setWls()

snuze\Reddit\Thing\Link::setWls ( int  $wls)
protected

Set the numeric whitelist status key, if any. A text version of the corresponding whitelist status is available in getWhitelistStatus()

Parameters
int$wls
Returns
$this

The documentation for this class was generated from the following file: