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

Public Member Functions

 __construct ()
 
 getIsFriend ()
 
- 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

 setIsFriend (bool $isFriend)
 
- 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

 $isFriend = false
 
- 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 UserAccount class represents the data exposed about another user's Reddit account. This is a (currently very small) superset of the common properties in the parent Account class.


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\UserAccount::__construct ( )

Constructor.

References snuze\Reddit\Thing\Thing\KIND_ACCOUNT.

Member Function Documentation

◆ getIsFriend()

snuze\Reddit\Thing\Account\UserAccount::getIsFriend ( )

Get whether or not this account is a "friend" of the authenticated user currently running Snuze

Returns
bool

◆ setIsFriend()

snuze\Reddit\Thing\Account\UserAccount::setIsFriend ( bool  $isFriend)
protected

Set whether or not this account is a "friend" of the authenticated user currently running Snuze

Parameters
bool$isFriend
Returns
$this This object

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