
Public Member Functions | |
| 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 () | |
Public Attributes | |
| 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' |
Protected Member Functions | |
| 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 | |
| $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 () |
The Account class represents the common properties exposed for any Reddit user account. You can't instantiate an Account; instead, you should create a MyAccount or a UserAccount, depending on the API request type.
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.
This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun@shaunc.com 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.
| snuze\Reddit\Thing\Account\Account::getCommentKarma | ( | ) |
Get this account's comment karma score
| snuze\Reddit\Thing\Account\Account::getHasSubscribed | ( | ) |
| snuze\Reddit\Thing\Account\Account::getHasVerifiedEmail | ( | ) |
Get whether or not this account has a verified email address
| snuze\Reddit\Thing\Account\Account::getHideFromRobots | ( | ) |
Get whether or not this account has enabled the "don't allow search engines to index my user profile" preference
| snuze\Reddit\Thing\Account\Account::getIconImg | ( | ) |
Get the full URI to this account's avatar image
| snuze\Reddit\Thing\Account\Account::getIsEmployee | ( | ) |
Get whether or not this account belongs to a Reddit administrator
| snuze\Reddit\Thing\Account\Account::getIsGold | ( | ) |
Get whether or not this account has Reddit Gold
| snuze\Reddit\Thing\Account\Account::getIsMod | ( | ) |
Get whether or not this account is a moderator of any subreddits
| snuze\Reddit\Thing\Account\Account::getLinkKarma | ( | ) |
Get this account's link karma score
| snuze\Reddit\Thing\Account\Account::getName | ( | ) |
Get this account's username
| snuze\Reddit\Thing\Account\Account::getPrefShowSnoovatar | ( | ) |
Get whether or not this account has enabled the "make my snoovatar public" preference
| snuze\Reddit\Thing\Account\Account::getSubreddit | ( | ) |
Get an array of key/value pairs defining this account's /u/username profile subreddit if one exists, or null otherwise
| snuze\Reddit\Thing\Account\Account::getVerified | ( | ) |
|
protected |
Set this account's comment karma score
| int | $commentKarma |
|
protected |
|
protected |
Set whether or not this account has a verified email address
| bool | $hasVerifiedEmail |
|
protected |
Set whether or not this account has enabled the "don't allow search engines to index my user profile" preference
| bool | $hideFromRobots |
|
protected |
Set the full URI to this account's avatar image
| string | $iconImg |
|
protected |
Set whether or not this account belongs to a Reddit administrator
| bool | $isEmployee |
|
protected |
Set whether or not this account has Reddit Gold
| bool | $isGold |
|
protected |
Set whether or not this account is a moderator of any subreddits
| bool | $isMod |
|
protected |
Set this account's link karma score
| int | $linkKarma |
|
protected |
Set this account's username
| string | $name |
|
protected |
Set whether or not this account has enabled the "make my snoovatar public" preference
| bool | $prefShowSnoovatar |
|
protected |
Set an array of key/value pairs defining this account's /u/username profile subreddit if one exists, or null otherwise
| array | $subreddit |
|
protected |
Unknown (always true?)
| bool | $verified |
| const snuze\Reddit\Thing\Account\Account::REGEX_VALID_NAME = '|^[a-z0-9_\-]{3,20}$|i' |
A regular expression used to test whether or not an account username is valid. Usernames must be between 3 and 20 characters long and may contain only alphanumerics, hyphens, and underscores.