Avatar¶
-
class
OC\Avatar\
Avatar
¶ - This class gets and sets users avatars.
Source: lib/private/Avatar/Avatar.php#51 Implements: OCP\IAvatar
Properties¶
-
protected static property
OC\Avatar\Avatar::$
logger
¶ Source: lib/private/Avatar/Avatar.php#54 Type: \Psr\Log\LoggerInterface
Methods¶
-
public
OC\Avatar\Avatar::
__construct
($logger)¶ Source: lib/private/Avatar/Avatar.php#72
-
public abstract
OC\Avatar\Avatar::
getDisplayName
()¶ - Returns the user display name.
Source: lib/private/Avatar/Avatar.php#81 Returns: string
-
public
OC\Avatar\Avatar::
get
($size=64)¶ Source: lib/private/Avatar/Avatar.php#102
-
protected
OC\Avatar\Avatar::
getAvatarVector
($size)¶ - {size} = 500{fill} = hex color to fill{letter} = Letter to displayGenerate SVG avatar
Source: Parameters: - $size (int) The requested image size in pixel
Returns: string
-
protected
OC\Avatar\Avatar::
generateAvatarFromSvg
($size)¶ - Generate png avatar from svg with Imagick
Source: Parameters: - $size (int)
Returns: string | bool
-
protected
OC\Avatar\Avatar::
generateAvatar
($userDisplayName, $size)¶ - Generate png avatar with GD
Source: Parameters: - $userDisplayName (string)
- $size (int)
Returns: string
-
protected
OC\Avatar\Avatar::
imageTTFCenter
($image, $text, $font, $size, $angle=0)¶ - Calculate real image ttf center
Source: Parameters: - $image (resource)
- $text (string) text string
- $font (string) font path
- $size (int) font size
- $angle (int)
Returns: array