PHP Class MetaUser

Inheritance: extends MetaDbObject, implements ArrayAccess
Datei anzeigen Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
__construct ( User $user = NULL )
getAttribute ( string $attribute ) : string Gets user attribute
getAuthor ( ) : MetaAuthor Get user related author
hasAttribute ( string $attribute ) : boolean Checks user attribute
has_permission ( string $permission ) : boolean Test if user has permission
image ( integer $width = 80, integer $height = 80, string $specs = 'fit', string $imagePath = null ) : string Get image src
is ( $name ) : boolean Test if user is a given type
isActive ( ) : boolean Test if user is active
isAdmin ( ) : boolean Test if user is admin
isAuthor ( ) : boolean Test if user is author
isBlogger ( ) : boolean Test if user is blogger
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )

Protected Methods

Method Description
getCountry ( ) : string Get the name of the country of the registered user
getCreated ( )
getDisplayName ( ) : string
getEmail ( )
getFirstName ( )
getId ( ) : integer Get user id
getLastName ( )
getPostsCount ( ) : integer Get posts count
getSubscriber ( )
getSubscriptions ( ) : MetaSubscription Get subscription
getTopics ( ) : array Get topics
getUsername ( )
isBlockedFromComments ( ) : boolean Test if user is blocked from commenting
isDefined ( )
isLoggedIn ( ) : boolean Test if user is logged in

Method Details

__construct() public method

public __construct ( User $user = NULL )
$user Newscoop\Entity\User

getAttribute() public method

Gets user attribute
public getAttribute ( string $attribute ) : string
$attribute string User attribute
return string

getAuthor() public method

Get user related author
public getAuthor ( ) : MetaAuthor
return MetaAuthor

getCountry() protected method

Get the name of the country of the registered user
protected getCountry ( ) : string
return string

getCreated() protected method

protected getCreated ( )

getDisplayName() protected method

protected getDisplayName ( ) : string
return string

getEmail() protected method

protected getEmail ( )

getFirstName() protected method

protected getFirstName ( )

getId() protected method

Get user id
Author: Mihai Balaceanu
protected getId ( ) : integer
return integer

getLastName() protected method

protected getLastName ( )

getPostsCount() protected method

Get posts count
protected getPostsCount ( ) : integer
return integer

getSubscriber() protected method

protected getSubscriber ( )

getSubscriptions() protected method

Get subscription
protected getSubscriptions ( ) : MetaSubscription
return MetaSubscription

getTopics() protected method

Get topics
protected getTopics ( ) : array
return array

getUsername() protected method

protected getUsername ( )

hasAttribute() public method

Checks user attribute
public hasAttribute ( string $attribute ) : boolean
$attribute string User attribute
return boolean

has_permission() public method

Test if user has permission
public has_permission ( string $permission ) : boolean
$permission string
return boolean

image() public method

Get image src
public image ( integer $width = 80, integer $height = 80, string $specs = 'fit', string $imagePath = null ) : string
$width integer
$height integer
$specs string
$imagePath string
return string

is() public method

Test if user is a given type
public is ( $name ) : boolean
return boolean

isActive() public method

Test if user is active
public isActive ( ) : boolean
return boolean

isAdmin() public method

Test if user is admin
public isAdmin ( ) : boolean
return boolean

isAuthor() public method

Test if user is author
public isAuthor ( ) : boolean
return boolean

isBlockedFromComments() protected method

Test if user is blocked from commenting
protected isBlockedFromComments ( ) : boolean
return boolean

isBlogger() public method

Test if user is blogger
public isBlogger ( ) : boolean
return boolean

isDefined() protected method

protected isDefined ( )

isLoggedIn() protected method

Test if user is logged in
protected isLoggedIn ( ) : boolean
return boolean

offsetExists() public method

See also: ArrayAccess
public offsetExists ( $offset )

offsetGet() public method

See also: ArrayAccess
public offsetGet ( $offset )

offsetSet() public method

See also: ArrayAccess
public offsetSet ( $offset, $value )

offsetUnset() public method

See also: ArrayAccess
public offsetUnset ( $offset )