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

Public Member Functions

 __construct ()
 
 getCanCreateSubreddit ()
 
 getCoins ()
 
 getFeatures ()
 
 getForcePasswordReset ()
 
 getGoldCreddits ()
 
 getGoldExpiration ()
 
 getHasAndroidSubscription ()
 
 getHasExternalAccount ()
 
 getHasGoldSubscription ()
 
 getHasIosSubscription ()
 
 getHasMail ()
 
 getHasModMail ()
 
 getHasPaypalSubscription ()
 
 getHasStripeSubscription ()
 
 getHasSubscribedToPremium ()
 
 getHasVisitedNewProfile ()
 
 getInBeta ()
 
 getInboxCount ()
 
 getInChat ()
 
 getInRedesignBeta ()
 
 getIsSponsor ()
 
 getIsSuspended ()
 
 getNewModmailExists ()
 
 getNumFriends ()
 
 getOauthClientId ()
 
 getOver18 ()
 
 getPrefAutoplay ()
 
 getPrefClickgadget ()
 
 getPrefGeopopular ()
 
 getPrefNightmode ()
 
 getPrefNoProfanity ()
 
 getPrefShowTrending ()
 
 getPrefShowTwitter ()
 
 getPrefTopKarmaSubreddits ()
 
 getPrefVideoAutoplay ()
 
 getSeenLayoutSwitch ()
 
 getSeenPremiumAdblockModal ()
 
 getSeenRedesignModal ()
 
 getSeenSubredditChatFtux ()
 
 getSuspensionExpirationUtc ()
 
 fromJson (string $json)
 
 toJson ()
 
- Public Member Functions inherited from snuze\Reddit\Thing\Account\Account
 getCommentKarma ()
 
 getHasSubscribed ()
 
 getHasVerifiedEmail ()
 
 getHideFromRobots ()
 
 getIconImg ()
 
 getIsEmployee ()
 
 getIsGold ()
 
 getIsMod ()
 
 getLinkKarma ()
 
 getName ()
 
 getPrefShowSnoovatar ()
 
 getSubreddit ()
 
 getVerified ()
 
- 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

 setCanCreateSubreddit (bool $canCreateSubreddit)
 
 setCoins (int $coins)
 
 setFeatures (array $features)
 
 setForcePasswordReset (bool $forcePasswordReset)
 
 setGoldCreddits (int $goldCreddits)
 
 setGoldExpiration (float $goldExpiration=null)
 
 setHasAndroidSubscription (bool $hasAndroidSubscription)
 
 setHasExternalAccount (bool $hasExternalAccount)
 
 setHasGoldSubscription (bool $hasGoldSubscription)
 
 setHasIosSubscription (bool $hasIosSubscription)
 
 setHasMail (bool $hasMail)
 
 setHasModMail (bool $hasModMail)
 
 setHasPaypalSubscription (bool $hasPaypalSubscription)
 
 setHasStripeSubscription (bool $hasStripeSubscription)
 
 setHasSubscribedToPremium (bool $hasSubscribedToPremium)
 
 setHasVisitedNewProfile (bool $hasVisitedNewProfile)
 
 setInBeta (bool $inBeta)
 
 setInboxCount (int $inboxCount)
 
 setInChat (bool $inChat)
 
 setInRedesignBeta (bool $inRedesignBeta)
 
 setIsSponsor (bool $isSponsor)
 
 setIsSuspended (bool $isSuspended)
 
 setNewModmailExists (bool $newModmailExists=null)
 
 setNumFriends (int $numFriends)
 
 setOauthClientId (string $oauthClientId)
 
 setOver18 (bool $over18)
 
 setPrefAutoplay (bool $prefAutoplay)
 
 setPrefClickgadget (int $prefClickgadget)
 
 setPrefGeopopular (string $prefGeopopular)
 
 setPrefNightmode (bool $prefNightmode)
 
 setPrefNoProfanity (bool $prefNoProfanity)
 
 setPrefShowTrending (bool $prefShowTrending)
 
 setPrefShowTwitter (bool $prefShowTwitter)
 
 setPrefTopKarmaSubreddits (bool $prefTopKarmaSubreddits)
 
 setPrefVideoAutoplay (bool $prefVideoAutoplay)
 
 setSeenLayoutSwitch (bool $seenLayoutSwitch)
 
 setSeenPremiumAdblockModal (bool $seenPremiumAdblockModal)
 
 setSeenRedesignModal (bool $seenRedesignModal)
 
 setSeenSubredditChatFtux (bool $seenSubredditChatFtux)
 
 setSuspensionExpirationUtc (float $suspensionExpirationUtc=null)
 
- Protected Member Functions inherited from snuze\Reddit\Thing\Account\Account
 setCommentKarma (int $commentKarma)
 
 setHasSubscribed (bool $hasSubscribed)
 
 setHasVerifiedEmail (bool $hasVerifiedEmail)
 
 setHideFromRobots (bool $hideFromRobots)
 
 setIconImg (string $iconImg)
 
 setIsEmployee (bool $isEmployee)
 
 setIsGold (bool $isGold)
 
 setIsMod (bool $isMod)
 
 setLinkKarma (int $linkKarma)
 
 setName (string $name)
 
 setPrefShowSnoovatar (bool $prefShowSnoovatar)
 
 setSubreddit (array $subreddit=null)
 
 setVerified (bool $verified)
 
- 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

 $canCreateSubreddit = false
 
 $coins = 0
 
 $features = []
 
 $forcePasswordReset = false
 
 $goldCreddits = 0
 
 $goldExpiration = null
 
 $hasAndroidSubscription = false
 
 $hasExternalAccount = false
 
 $hasGoldSubscription = false
 
 $hasIosSubscription = false
 
 $hasMail = false
 
 $hasModMail = false
 
 $hasPaypalSubscription = false
 
 $hasStripeSubscription = false
 
 $hasSubscribedToPremium = false
 
 $hasVisitedNewProfile = false
 
 $inboxCount = 0
 
 $inBeta = false
 
 $inChat = false
 
 $inRedesignBeta = false
 
 $isSponsor = false
 
 $isSuspended = false
 
 $newModmailExists = null
 
 $numFriends = 0
 
 $oauthClientId = ''
 
 $over18 = false
 
 $prefAutoplay = false
 
 $prefClickgadget = 0
 
 $prefGeopopular = ''
 
 $prefNightmode = false
 
 $prefNoProfanity = false
 
 $prefShowTrending = false
 
 $prefShowTwitter = false
 
 $prefTopKarmaSubreddits = true
 
 $prefVideoAutoplay = false
 
 $seenLayoutSwitch = false
 
 $seenPremiumAdblockModal = false
 
 $seenRedesignModal = false
 
 $seenSubredditChatFtux = false
 
 $suspensionExpirationUtc = null
 
- Protected Attributes inherited from snuze\Reddit\Thing\Account\Account
 $id = null
 
 $commentKarma = 0
 
 $hasSubscribed = true
 
 $hasVerifiedEmail = false
 
 $hideFromRobots = false
 
 $iconImg = ''
 
 $isEmployee = false
 
 $isGold = false
 
 $isMod = false
 
 $linkKarma = 1
 
 $name = ''
 
 $prefShowSnoovatar = false
 
 $subreddit = null
 
 $verified = false
 
- 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\Account\Account
const REGEX_VALID_NAME = '|^[a-z0-9_\-]{3,20}$|i'
 
- 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 MyAccount class represents the data exposed about the authenticated user's own account. This is a significant superset of the common properties in the parent Account class.

An attempt has been made to map all fields supplied by the API, regardless of their utility (or lack thereof).

Implementation warning: The $subreddit array is currently populated as-is, without any further processing. Calling getSubreddit() will return an array of key/value pairs defining the user's /u/username profile subreddit, or null if one doesn't exist. This is subject to change in a future major version, such that a Subreddit object may be returned instead.

Implementation warning: The $features array is currently populated as-is, without any further processing. Calling getFeatures() will return an array of key/value pairs defining the user's settings for various Reddit features, tests, and experiments. 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\Account\MyAccount::__construct ( )

Constructor.

References snuze\Reddit\Thing\Thing\KIND_ACCOUNT.

Member Function Documentation

◆ fromJson()

snuze\Reddit\Thing\Account\MyAccount::fromJson ( string  $json)

Overrides parent to perform specialized data handling. Reddit doesn't return the typical "thing" data structure in response to this type of request. Here, the response is massaged into the expected format so it can be treated just like any other Account.

Accepts a JSON-formatted string, uses it to build an Account object, and returns that object. This satisfies a promise made in the Jsonable interface.

Parameters
string$json
Returns
\snuze\Reddit\Thing\Account
See also
\snuze\Interfaces\Jsonable

Implements snuze\Interfaces\Jsonable.

◆ getCanCreateSubreddit()

snuze\Reddit\Thing\Account\MyAccount::getCanCreateSubreddit ( )

Get whether or not this account is allowed to create a subreddit

Returns
bool

◆ getCoins()

snuze\Reddit\Thing\Account\MyAccount::getCoins ( )

Get the number of Reddit Premium coins this account has available

Returns
int

◆ getFeatures()

snuze\Reddit\Thing\Account\MyAccount::getFeatures ( )

Get the array of key/value pairs defining the account's settings for various Reddit features, tests, and experiments

Returns
array

◆ getForcePasswordReset()

snuze\Reddit\Thing\Account\MyAccount::getForcePasswordReset ( )

Get whether or not this account is required to change its password for security purposes

Returns
bool

◆ getGoldCreddits()

snuze\Reddit\Thing\Account\MyAccount::getGoldCreddits ( )

Get the number of Reddit Gold creddits this account has available

Returns
int

◆ getGoldExpiration()

snuze\Reddit\Thing\Account\MyAccount::getGoldExpiration ( )

Get the epoch time at which this account's Reddit Gold/Premium expires, or null if there's no subscription.

Returns
float|null A unix epoch timestamp, as a float; or null

◆ getHasAndroidSubscription()

snuze\Reddit\Thing\Account\MyAccount::getHasAndroidSubscription ( )

Get whether or not this account is subscribed to Reddit Premium via the Android application

Returns
bool

◆ getHasExternalAccount()

snuze\Reddit\Thing\Account\MyAccount::getHasExternalAccount ( )

Get whether or not this account has a third-party social media account linked to it

Returns
bool

◆ getHasGoldSubscription()

snuze\Reddit\Thing\Account\MyAccount::getHasGoldSubscription ( )

Get whether or not this account has an active Reddit Gold subscription

Returns
bool

◆ getHasIosSubscription()

snuze\Reddit\Thing\Account\MyAccount::getHasIosSubscription ( )

Get whether or not this account is subscribed to Reddit Premium via the Apple iOS application

Returns
bool

◆ getHasMail()

snuze\Reddit\Thing\Account\MyAccount::getHasMail ( )

Get whether or not this account has unread direct messages

Returns
bool

◆ getHasModMail()

snuze\Reddit\Thing\Account\MyAccount::getHasModMail ( )

Get whether or not this account has unread modmail messages

Returns
bool

◆ getHasPaypalSubscription()

snuze\Reddit\Thing\Account\MyAccount::getHasPaypalSubscription ( )

Get whether or not this account is subscribed to Reddit Premium via PayPal

Returns
bool

◆ getHasStripeSubscription()

snuze\Reddit\Thing\Account\MyAccount::getHasStripeSubscription ( )

Get whether or not this account is subscribed to Reddit Premium via Stripe

Returns
bool

◆ getHasSubscribedToPremium()

snuze\Reddit\Thing\Account\MyAccount::getHasSubscribedToPremium ( )

Get whether or not this account has ever had new-style Reddit Premium

Returns
bool

◆ getHasVisitedNewProfile()

snuze\Reddit\Thing\Account\MyAccount::getHasVisitedNewProfile ( )

Get whether or not this account has visited its redesign-style profile

Returns
bool

◆ getInBeta()

snuze\Reddit\Thing\Account\MyAccount::getInBeta ( )

Get whether or not this account has opted in to beta participation

Returns
bool

◆ getInboxCount()

snuze\Reddit\Thing\Account\MyAccount::getInboxCount ( )

Get the number of unread direct messages this account has

Returns
int

◆ getInChat()

snuze\Reddit\Thing\Account\MyAccount::getInChat ( )

Get whether or not this account is eligible to receive chat messages

Returns
bool

◆ getInRedesignBeta()

snuze\Reddit\Thing\Account\MyAccount::getInRedesignBeta ( )

Get whether or not this account has opted in to beta test Digg 5.0

Returns
bool

◆ getIsSponsor()

snuze\Reddit\Thing\Account\MyAccount::getIsSponsor ( )

Get whether or not this account is a Reddit advertiser

Returns
bool

◆ getIsSuspended()

snuze\Reddit\Thing\Account\MyAccount::getIsSuspended ( )

Get whether or not this account is suspended for rule violations

Returns
bool

◆ getNewModmailExists()

snuze\Reddit\Thing\Account\MyAccount::getNewModmailExists ( )

Get whether or not this account is enrolled in the new modmail system

Returns
bool|null
Todo:
make sure the docs are right here. Is this "you have the new modmail" or "you have unread modmail messages"?

◆ getNumFriends()

snuze\Reddit\Thing\Account\MyAccount::getNumFriends ( )

Get the number of other users this account has friended

Returns
int

◆ getOauthClientId()

snuze\Reddit\Thing\Account\MyAccount::getOauthClientId ( )

Get the OAuth client ID this account is currently authenticated with (this will correspond to the currently-running script application)

Returns
string

◆ getOver18()

snuze\Reddit\Thing\Account\MyAccount::getOver18 ( )

Get whether or not this account has enabled the "I am over eighteen years old and willing to view adult content" preference

Returns
bool

◆ getPrefAutoplay()

snuze\Reddit\Thing\Account\MyAccount::getPrefAutoplay ( )

Get whether or not this account has enabled the auto-play preference

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getPrefClickgadget()

snuze\Reddit\Thing\Account\MyAccount::getPrefClickgadget ( )

Get whether or not this account has enabled the "show me links I've recently viewed" preference. Reddit supplies this one as an integer instead of a boolean.

Returns
int

◆ getPrefGeopopular()

snuze\Reddit\Thing\Account\MyAccount::getPrefGeopopular ( )

Get the locality code, if any, that Reddit is using as a hint to build a geographically-oriented "/r/popular" list for this account

Returns
string

◆ getPrefNightmode()

snuze\Reddit\Thing\Account\MyAccount::getPrefNightmode ( )

Get whether or not this account has enabled the night mode theme

Returns
bool

◆ getPrefNoProfanity()

snuze\Reddit\Thing\Account\MyAccount::getPrefNoProfanity ( )

Get whether or not this account has enabled the "hide images for NSFW/18+ content" preference

Returns
bool

◆ getPrefShowTrending()

snuze\Reddit\Thing\Account\MyAccount::getPrefShowTrending ( )

Get whether or not this account has enabled the "show trending subreddits on the home feed" preference

Returns
bool

◆ getPrefShowTwitter()

snuze\Reddit\Thing\Account\MyAccount::getPrefShowTwitter ( )

Get whether or not this account displays a linked Twitter account on its profile

Returns
bool
See also
MyAccount::getHasExternalAccount()

◆ getPrefTopKarmaSubreddits()

snuze\Reddit\Thing\Account\MyAccount::getPrefTopKarmaSubreddits ( )

Get whether this account has some preference or another enabled

Returns
bool
Todo:
verify what exactly this corresponds to

◆ getPrefVideoAutoplay()

snuze\Reddit\Thing\Account\MyAccount::getPrefVideoAutoplay ( )

Get whether or not this account has the "Autoplay Reddit videos on the desktop comments page" preference enabled

Returns
bool

◆ getSeenLayoutSwitch()

snuze\Reddit\Thing\Account\MyAccount::getSeenLayoutSwitch ( )

Get whether or not this account has been shown a layout switch interface

Returns
bool

◆ getSeenPremiumAdblockModal()

snuze\Reddit\Thing\Account\MyAccount::getSeenPremiumAdblockModal ( )

Get whether or not this account has been shown a "buying Reddit Premium lets you disable (some) ads" dialog

Returns
bool

◆ getSeenRedesignModal()

snuze\Reddit\Thing\Account\MyAccount::getSeenRedesignModal ( )

Get whether or not this account has been shown a dialog about the redesign

Returns
bool

◆ getSeenSubredditChatFtux()

snuze\Reddit\Thing\Account\MyAccount::getSeenSubredditChatFtux ( )

Get whether or not this account has been shown a first-time user interface about the subreddit chat feature

Returns
bool

◆ getSuspensionExpirationUtc()

snuze\Reddit\Thing\Account\MyAccount::getSuspensionExpirationUtc ( )

If this account is suspended for rule violations and is eligible to be reinstated, get the unix epoch at which time that will occur

Returns
float|null A unix epoch timestamp, as a float; or null

◆ setCanCreateSubreddit()

snuze\Reddit\Thing\Account\MyAccount::setCanCreateSubreddit ( bool  $canCreateSubreddit)
protected

Set whether or not this account is allowed to create a subreddit

Parameters
bool$canCreateSubreddit
Returns
$this

◆ setCoins()

snuze\Reddit\Thing\Account\MyAccount::setCoins ( int  $coins)
protected

Set the number of Reddit Premium coins this account has available

Parameters
int$coins
Returns
$this

◆ setFeatures()

snuze\Reddit\Thing\Account\MyAccount::setFeatures ( array  $features)
protected

Set the array of key/value pairs defining the account's settings for various Reddit features, tests, and experiments

Parameters
array$features
Returns
$this

◆ setForcePasswordReset()

snuze\Reddit\Thing\Account\MyAccount::setForcePasswordReset ( bool  $forcePasswordReset)
protected

Set whether or not this account is required to change its password for security purposes

Parameters
bool$forcePasswordReset
Returns
$this

◆ setGoldCreddits()

snuze\Reddit\Thing\Account\MyAccount::setGoldCreddits ( int  $goldCreddits)
protected

Set the number of Reddit Gold creddits this account has available

Parameters
int$goldCreddits
Returns
$this

◆ setGoldExpiration()

snuze\Reddit\Thing\Account\MyAccount::setGoldExpiration ( float  $goldExpiration = null)
protected

Set the epoch time at which this account's Reddit Gold/Premium expires, or null if there's no subscription.

Parameters
float$goldExpirationA unix epoch timestamp, as a float; or null
Returns
$this

◆ setHasAndroidSubscription()

snuze\Reddit\Thing\Account\MyAccount::setHasAndroidSubscription ( bool  $hasAndroidSubscription)
protected

Set whether or not this account is subscribed to Reddit Premium via the Android application

Parameters
bool$hasAndroidSubscription
Returns
$this

◆ setHasExternalAccount()

snuze\Reddit\Thing\Account\MyAccount::setHasExternalAccount ( bool  $hasExternalAccount)
protected

Set whether or not this account has a third-party social media account linked to it

Parameters
bool$hasExternalAccount
Returns
$this

◆ setHasGoldSubscription()

snuze\Reddit\Thing\Account\MyAccount::setHasGoldSubscription ( bool  $hasGoldSubscription)
protected

Set whether or not this account has an active Reddit Gold subscription

Parameters
bool$hasGoldSubscription
Returns
$this

◆ setHasIosSubscription()

snuze\Reddit\Thing\Account\MyAccount::setHasIosSubscription ( bool  $hasIosSubscription)
protected

Set whether or not this account is subscribed to Reddit Premium via the Apple iOS application

Parameters
bool$hasIosSubscription
Returns
$this

◆ setHasMail()

snuze\Reddit\Thing\Account\MyAccount::setHasMail ( bool  $hasMail)
protected

Set whether or not this account has unread direct messages

Parameters
bool$hasMail
Returns
$this

◆ setHasModMail()

snuze\Reddit\Thing\Account\MyAccount::setHasModMail ( bool  $hasModMail)
protected

Set whether or not this account has unread modmail messages

Parameters
bool$hasModMail
Returns
$this

◆ setHasPaypalSubscription()

snuze\Reddit\Thing\Account\MyAccount::setHasPaypalSubscription ( bool  $hasPaypalSubscription)
protected

Set whether or not this account is subscribed to Reddit Premium via PayPal

Parameters
bool$hasPaypalSubscription
Returns
$this

◆ setHasStripeSubscription()

snuze\Reddit\Thing\Account\MyAccount::setHasStripeSubscription ( bool  $hasStripeSubscription)
protected

Set whether or not this account is subscribed to Reddit Premium via Stripe

Parameters
bool$hasStripeSubscription
Returns
$this

◆ setHasSubscribedToPremium()

snuze\Reddit\Thing\Account\MyAccount::setHasSubscribedToPremium ( bool  $hasSubscribedToPremium)
protected

Set whether or not this account has ever had new-style Reddit Premium

Parameters
bool$hasSubscribedToPremium
Returns
$this

◆ setHasVisitedNewProfile()

snuze\Reddit\Thing\Account\MyAccount::setHasVisitedNewProfile ( bool  $hasVisitedNewProfile)
protected

Set whether or not this account has visited its redesign style profile

Parameters
bool$hasVisitedNewProfile
Returns
$this

◆ setInBeta()

snuze\Reddit\Thing\Account\MyAccount::setInBeta ( bool  $inBeta)
protected

Set whether or not this account has opted in to beta participation

Parameters
bool$inBeta
Returns
$this

◆ setInboxCount()

snuze\Reddit\Thing\Account\MyAccount::setInboxCount ( int  $inboxCount)
protected

Set the number of unread direct messages this account has

Parameters
int$inboxCount
Returns
$this

◆ setInChat()

snuze\Reddit\Thing\Account\MyAccount::setInChat ( bool  $inChat)
protected

Set whether or not this account is eligible to receive chat messages

Parameters
bool$inChat
Returns
$this

◆ setInRedesignBeta()

snuze\Reddit\Thing\Account\MyAccount::setInRedesignBeta ( bool  $inRedesignBeta)
protected

Set whether or not this account has opted in to beta test Digg 5.0

Parameters
bool$inRedesignBeta
Returns
$this

◆ setIsSponsor()

snuze\Reddit\Thing\Account\MyAccount::setIsSponsor ( bool  $isSponsor)
protected

Set whether or not this account is a Reddit advertiser

Parameters
bool$isSponsor
Returns
$this

◆ setIsSuspended()

snuze\Reddit\Thing\Account\MyAccount::setIsSuspended ( bool  $isSuspended)
protected

Set whether or not this account is suspended for rule violations

Parameters
bool$isSuspended
Returns
$this

◆ setNewModmailExists()

snuze\Reddit\Thing\Account\MyAccount::setNewModmailExists ( bool  $newModmailExists = null)
protected

Set whether or not this account is enrolled in the new modmail system

Parameters
bool$newModmailExists
Returns
$this
Todo:
make sure the docs are right here. Is this "you have the new modmail interface" or "you have unread modmail messages"?

◆ setNumFriends()

snuze\Reddit\Thing\Account\MyAccount::setNumFriends ( int  $numFriends)
protected

Set the number of other users this account has friended

Parameters
int$numFriends
Returns
$this

◆ setOauthClientId()

snuze\Reddit\Thing\Account\MyAccount::setOauthClientId ( string  $oauthClientId)
protected

Set the OAuth client ID this account is currently authenticated with

Parameters
string$oauthClientId
Returns
$this

◆ setOver18()

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

Set whether or not this account has enabled the "I am over eighteen years old and willing to view adult content" preference

Parameters
bool$over18
Returns
$this

◆ setPrefAutoplay()

snuze\Reddit\Thing\Account\MyAccount::setPrefAutoplay ( bool  $prefAutoplay)
protected

Set whether or not this account has enabled the auto-play preference

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

◆ setPrefClickgadget()

snuze\Reddit\Thing\Account\MyAccount::setPrefClickgadget ( int  $prefClickgadget)
protected

Set whether or not this account has enabled the "show me links I've recently viewed" preference. Reddit supplies this one as an integer instead of a boolean.

Parameters
int$prefClickgadget
Returns
$this

◆ setPrefGeopopular()

snuze\Reddit\Thing\Account\MyAccount::setPrefGeopopular ( string  $prefGeopopular)
protected

Set the locality code, if any, that Reddit is using as a hint to build a geographically-oriented "/r/popular" list for this account

Parameters
string$prefGeopopular
Returns
$this

◆ setPrefNightmode()

snuze\Reddit\Thing\Account\MyAccount::setPrefNightmode ( bool  $prefNightmode)
protected

Set whether or not this account has enabled the night mode theme

Parameters
bool$prefNightmode
Returns
$this

◆ setPrefNoProfanity()

snuze\Reddit\Thing\Account\MyAccount::setPrefNoProfanity ( bool  $prefNoProfanity)
protected

Set whether or not this account has enabled the "hide images for NSFW/18+ content" preference

Parameters
bool$prefNoProfanity
Returns
$this

◆ setPrefShowTrending()

snuze\Reddit\Thing\Account\MyAccount::setPrefShowTrending ( bool  $prefShowTrending)
protected

Set whether or not this account has enabled the "show trending subreddits on the home feed" preference

Parameters
bool$prefShowTrending
Returns
$this

◆ setPrefShowTwitter()

snuze\Reddit\Thing\Account\MyAccount::setPrefShowTwitter ( bool  $prefShowTwitter)
protected

Set whether or not this account displays a linked Twitter account on its profile

Parameters
bool$prefShowTwitter
Returns
$this
See also
MyAccount::setHasExternalAccount()

◆ setPrefTopKarmaSubreddits()

snuze\Reddit\Thing\Account\MyAccount::setPrefTopKarmaSubreddits ( bool  $prefTopKarmaSubreddits)
protected

Set whether this account has some preference or another enabled

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

◆ setPrefVideoAutoplay()

snuze\Reddit\Thing\Account\MyAccount::setPrefVideoAutoplay ( bool  $prefVideoAutoplay)
protected

Set whether or not this account has the "Autoplay Reddit videos on the desktop comments page" preference enabled

Parameters
bool$prefVideoAutoplay
Returns
$this

◆ setSeenLayoutSwitch()

snuze\Reddit\Thing\Account\MyAccount::setSeenLayoutSwitch ( bool  $seenLayoutSwitch)
protected

Set whether or not this account has been shown a layout switch interface

Parameters
bool$seenLayoutSwitch
Returns
$this

◆ setSeenPremiumAdblockModal()

snuze\Reddit\Thing\Account\MyAccount::setSeenPremiumAdblockModal ( bool  $seenPremiumAdblockModal)
protected

Set whether or not this account has been shown a "buying Reddit Premium lets you disable (some) ads" dialog

Parameters
bool$seenPremiumAdblockModal
Returns
$this

◆ setSeenRedesignModal()

snuze\Reddit\Thing\Account\MyAccount::setSeenRedesignModal ( bool  $seenRedesignModal)
protected

Set whether or not this account has been shown a dialog about the redesign

Parameters
bool$seenRedesignModal
Returns
$this

◆ setSeenSubredditChatFtux()

snuze\Reddit\Thing\Account\MyAccount::setSeenSubredditChatFtux ( bool  $seenSubredditChatFtux)
protected

Set whether or not this account has been shown a first-time user interface about the subreddit chat feature

Parameters
bool$seenSubredditChatFtux
Returns
$this

◆ setSuspensionExpirationUtc()

snuze\Reddit\Thing\Account\MyAccount::setSuspensionExpirationUtc ( float  $suspensionExpirationUtc = null)
protected

If this account is suspended for rule violations and is eligible to be reinstated, set the unix epoch at which time that will occur

Parameters
float$suspensionExpirationUtcA unix epoch timestamp, as a float; or null
Returns
$this

◆ toJson()

snuze\Reddit\Thing\Account\MyAccount::toJson ( )

Overrides parent to perform specialized data handling. Reddit doesn't return the typical "thing" data structure in response to this type of request. Here, the JSON is massaged back into the original format.

Returns a JSON-formatted string representing this Thing's properties.

Returns
string

Implements snuze\Interfaces\Jsonable.

References snuze\Reddit\Thing\Thing\getPropertyTranslationMap().


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