PHP 클래스 Newscoop\Entity\User

상속: implements Zend_Acl_Role_Interface, implements Symfony\Component\Security\Core\User\UserInterface, implements Symfony\Component\Security\Core\User\AdvancedUserInterface, implements Serializable, implements Symfony\Component\Security\Core\User\EquatableInterface, implements Newscoop\Search\DocumentInterface
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$image string

보호된 프로퍼티들

프로퍼티 타입 설명
$attributes Doctrine\Common\Collections\Collection;
$author Newscoop\Entity\Author
$city string
$clients Newscoop\Package\Package
$commenters Doctrine\Common\Collections\Collection;
$countryCode string
$created DateTime
$email string
$first_name string
$groups Doctrine\Common\Collections\Collection;
$id integer
$identities Doctrine\Common\Collections\Collection
$indexed DateTime
$is_admin boolean
$is_public boolean
$lastLogin DateTime
$last_name string
$password string
$phone string
$points integer
$postal string
$publication integer
$resetToken string
$role Newscoop\Entity\Acl\Role
$state string
$status integer
$street string
$subscriber integer
$topics Doctrine\Common\Collections\ArrayCollection
$updated DateTime
$username string

공개 메소드들

메소드 설명
__construct ( string $email = null )
__toString ( ) : string
addAttribute ( string $name, string $value ) : Newscoop\Entity\User Add attribute
addClient ( Client $client ) : Newscoop\Entity\User Add oauth client
addUserType ( Group $type ) : Newscoop\Entity\User Add user type
checkPassword ( string $password ) : boolean Check password
eraseCredentials ( ) Removes sensitive data from the user.
exists ( ) : boolean Check if the user exists Test if there is set an id
generateRandomString ( integer $length = 12, string $allowed_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) : string Get random string
getAttribute ( string $name ) : mixed Get attribute
getAttributes ( ) : array Get all user attributes
getAuthor ( ) : integer Get author
getAuthorId ( ) : integer Get author id
getCity ( ) : string Get city
getClients ( ) : ArrayCollection Get oauth clients
getCommenters ( )
getComments ( ) : array Get a User's comments which are associated with his User account.
getCountryCode ( ) : string Get country code
getCreated ( ) : DateTime Get created datetime
getDataTableView ( Zend_View_Abstract $view ) : object TODO: move this to user service - it's not a part of entity
getEditView ( Zend_View_Abstract $view ) : object TODO: move this to user service - it's not a part of entity
getEmail ( ) : string Get email
getFirstName ( ) : string Get first name
getGroupNames ( ) : array Get group names
getGroups ( ) : array Get groups
getId ( ) : integer Get id
getImage ( ) : string Get image
getIndexed ( ) : DateTime Get indexed
getLastLogin ( ) : void Get lastLogin
getLastName ( ) : string Get last name
getName ( ) : string Get name
getObject ( )
getPassword ( ) : [type] Get password for authentication
getPhone ( ) : string Get phone
getPoints ( ) : integer Get points
getPostal ( ) : string Get postal code
getProperty ( $p_key ) : mixed Get an enity property
getPublication ( ) : integer Get publication id which user registered with
getRawAttributes ( ) : array Get raw user attributes
getRealName ( ) : string Get real name
getResetToken ( ) : string Get password reset token
getRoleId ( ) : integer Get role id
getRoles ( ) : array Get user roles for authentication
getSalt ( ) : string Get password salt for authentication
getState ( ) : string Get state
getStatus ( ) : integer Get status
getStreet ( ) : string Get street address
getSubscriber ( ) : integer Get subscriber
getTopics ( ) : ArrayCollection | null Gets user's topics
getUpdated ( ) : DateTime Get updated datetime
getUserId ( ) : integer Get user id proxy to getId
getUserTypes ( ) : array Get user types
getUsername ( ) : string Get username
getView ( ) : UserView Get view
hasClient ( Client $client ) : boolean Has client
hasGroup ( string $name ) : boolean Test if user has group
hasPermission ( string $permission, string $resource = null, string $action = null ) : boolean Check permissions
isAccountNonExpired ( ) : boolean Checks if the user account is not expired.
isAccountNonLocked ( ) : boolean Checks if the user account is not locked. Currently there is no seperation between pending and banned.
isActive ( ) : boolean Test if user is active
isAdmin ( ) : boolean Test if user is admin
isBanned ( ) : boolean Test if user is banned
isCredentialsNonExpired ( ) : boolean Checks if credentials are expired. We don't have this mechanism in Newscoop.
isEnabled ( ) : boolean Checks if the user account is enabled.
isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
isPending ( ) : boolean Test if user is pending
isPublic ( ) : boolean Test if user is public
preUpdate ( )
removeAttribute ( string $name ) : Newscoop\Entity\UserAttribute Remove attribute
rename ( string $username ) : void TODO: move this to user service - it's not a part of entity
render ( ) : UserView TODO: move this to user service - it's not a part of entity
serialize ( )
setActive ( ) : Newscoop\Entity\User Set user as active
setAdmin ( boolean $admin ) : Newscoop\Entity\User Set admin switch
setAttributes ( mixed $attributes ) Set User attributes
setAuthor ( Author $author = null ) : Newscoop\Entity\User Set author
setCity ( string $city ) : string Set city
setCountryCode ( string $countryCode ) : string Set country code
setEmail ( string $email ) : Newscoop\Entity\User Set email
setFirstName ( string $first_name ) : Newscoop\Entity\User Set first name
setImage ( string $image ) : Newscoop\Entity\User Set image
setIndexed ( DateTime $indexed = null ) : self Set indexed
setLastLogin ( DateTime $lastLogin = null ) : void Set lastLogin
setLastName ( string $last_name ) : Newscoop\Entity\User Set last name
setPassword ( string $password ) : Newscoop\Entity\User Set password
setPhone ( string $phone ) : string Set phone
setPoints ( integer $points ) : Newscoop\Entity\User Set points
setPostal ( string $postal ) : string Set postal code
setPublic ( boolean $public = true ) : Newscoop\Entity\User Set user is public
setPublication ( integer $publication ) : integer Set publication which user registered with
setResetToken ( integer $resetToken ) : string Set password reset token
setRole ( Role $role ) : Newscoop\Entity\User Set role
setState ( string $state ) : string Set state
setStatus ( integer $status ) : Newscoop\Entity\User Set status
setStreet ( string $street ) : string Set street address
setSubscriber ( integer $subscriber ) : Newscoop\Entity\User Set subscriber
setUsername ( string $username ) : Newscoop\Entity\User Set username
unserialize ( $data )
updateProfile ( string $username, string $password, string $firstName, string $lastName, string $image, array $attributes ) TODO: move this to user service - it's not a part of entity

비공개 메소드들

메소드 설명
getViewUrl ( string $action, Zend_View_Abstract $view ) : string TODO: move this to user service - it's not a part of entity

메소드 상세

__construct() 공개 메소드

public __construct ( string $email = null )
$email string

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

addAttribute() 공개 메소드

Add attribute
public addAttribute ( string $name, string $value ) : Newscoop\Entity\User
$name string
$value string
리턴 Newscoop\Entity\User

addClient() 공개 메소드

Add oauth client
public addClient ( Client $client ) : Newscoop\Entity\User
$client Newscoop\GimmeBundle\Entity\Client
리턴 Newscoop\Entity\User

addUserType() 공개 메소드

Add user type
public addUserType ( Group $type ) : Newscoop\Entity\User
$type Newscoop\Entity\User\Group
리턴 Newscoop\Entity\User

checkPassword() 공개 메소드

Check password
public checkPassword ( string $password ) : boolean
$password string
리턴 boolean

eraseCredentials() 공개 메소드

Removes sensitive data from the user.
public eraseCredentials ( )

exists() 공개 메소드

Check if the user exists Test if there is set an id
사용 중단: legacy from frontend controllers
public exists ( ) : boolean
리턴 boolean

generateRandomString() 최종 공개 메소드

Get random string
final public generateRandomString ( integer $length = 12, string $allowed_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) : string
$length integer
$allowed_chars string
리턴 string

getAttribute() 공개 메소드

Get attribute
public getAttribute ( string $name ) : mixed
$name string
리턴 mixed

getAttributes() 공개 메소드

Get all user attributes
public getAttributes ( ) : array
리턴 array of all user attributes

getAuthor() 공개 메소드

Get author
public getAuthor ( ) : integer
리턴 integer

getAuthorId() 공개 메소드

Get author id
public getAuthorId ( ) : integer
리턴 integer

getCity() 공개 메소드

Get city
public getCity ( ) : string
리턴 string

getClients() 공개 메소드

Get oauth clients
public getClients ( ) : ArrayCollection
리턴 Doctrine\Common\Collections\ArrayCollection

getCommenters() 공개 메소드

public getCommenters ( )

getComments() 공개 메소드

Get a User's comments which are associated with his User account.
public getComments ( ) : array
리턴 array

getCountryCode() 공개 메소드

Get country code
public getCountryCode ( ) : string
리턴 string

getCreated() 공개 메소드

Get created datetime
public getCreated ( ) : DateTime
리턴 DateTime

getDataTableView() 공개 메소드

Get DataTable view
public getDataTableView ( Zend_View_Abstract $view ) : object
$view Zend_View_Abstract
리턴 object

getEditView() 공개 메소드

Get edit view
public getEditView ( Zend_View_Abstract $view ) : object
$view Zend_View_Abstract
리턴 object

getEmail() 공개 메소드

Get email
public getEmail ( ) : string
리턴 string

getFirstName() 공개 메소드

Get first name
public getFirstName ( ) : string
리턴 string

getGroupNames() 공개 메소드

Get group names
public getGroupNames ( ) : array
리턴 array

getGroups() 공개 메소드

Get groups
public getGroups ( ) : array
리턴 array of Newscoop\Entity\User\Group

getId() 공개 메소드

Get id
public getId ( ) : integer
리턴 integer

getImage() 공개 메소드

Get image
public getImage ( ) : string
리턴 string

getIndexed() 공개 메소드

Get indexed
public getIndexed ( ) : DateTime
리턴 DateTime

getLastLogin() 공개 메소드

Get lastLogin
public getLastLogin ( ) : void
리턴 void

getLastName() 공개 메소드

Get last name
public getLastName ( ) : string
리턴 string

getName() 공개 메소드

Get name
public getName ( ) : string
리턴 string

getObject() 공개 메소드

public getObject ( )

getPassword() 공개 메소드

Get password for authentication
public getPassword ( ) : [type]
리턴 [type]

getPhone() 공개 메소드

Get phone
public getPhone ( ) : string
리턴 string

getPoints() 공개 메소드

Get points
public getPoints ( ) : integer
리턴 integer

getPostal() 공개 메소드

Get postal code
public getPostal ( ) : string
리턴 string

getProperty() 공개 메소드

Get an enity property
사용 중단: legacy from frontend controllers
public getProperty ( $p_key ) : mixed
$p_key
리턴 mixed

getPublication() 공개 메소드

Get publication id which user registered with
public getPublication ( ) : integer
리턴 integer

getRawAttributes() 공개 메소드

Get raw user attributes
public getRawAttributes ( ) : array
리턴 array

getRealName() 공개 메소드

Get real name
public getRealName ( ) : string
리턴 string

getResetToken() 공개 메소드

Get password reset token
public getResetToken ( ) : string
리턴 string

getRoleId() 공개 메소드

Get role id
public getRoleId ( ) : integer
리턴 integer

getRoles() 공개 메소드

Get user roles for authentication
public getRoles ( ) : array
리턴 array array with roles

getSalt() 공개 메소드

Get password salt for authentication
public getSalt ( ) : string
리턴 string

getState() 공개 메소드

Get state
public getState ( ) : string
리턴 string

getStatus() 공개 메소드

Get status
public getStatus ( ) : integer
리턴 integer

getStreet() 공개 메소드

Get street address
public getStreet ( ) : string
리턴 string

getSubscriber() 공개 메소드

Get subscriber
public getSubscriber ( ) : integer
리턴 integer

getTopics() 공개 메소드

Gets user's topics
public getTopics ( ) : ArrayCollection | null
리턴 Doctrine\Common\Collections\ArrayCollection | null

getUpdated() 공개 메소드

Get updated datetime
public getUpdated ( ) : DateTime
리턴 DateTime

getUserId() 공개 메소드

Get user id proxy to getId
public getUserId ( ) : integer
리턴 integer

getUserTypes() 공개 메소드

Get user types
public getUserTypes ( ) : array
리턴 array

getUsername() 공개 메소드

Get username
public getUsername ( ) : string
리턴 string

getView() 공개 메소드

Get view
public getView ( ) : UserView
리턴 Newscoop\View\UserView

hasClient() 공개 메소드

Has client
public hasClient ( Client $client ) : boolean
$client Newscoop\GimmeBundle\Entity\Client
리턴 boolean

hasGroup() 공개 메소드

Test if user has group
public hasGroup ( string $name ) : boolean
$name string
리턴 boolean

hasPermission() 공개 메소드

Check permissions
public hasPermission ( string $permission, string $resource = null, string $action = null ) : boolean
$permission string
$resource string
$action string
리턴 boolean

isAccountNonExpired() 공개 메소드

Checks if the user account is not expired.
public isAccountNonExpired ( ) : boolean
리턴 boolean In active status

isAccountNonLocked() 공개 메소드

Checks if the user account is not locked. Currently there is no seperation between pending and banned.
public isAccountNonLocked ( ) : boolean
리턴 boolean Not locked status

isActive() 공개 메소드

Test if user is active
public isActive ( ) : boolean
리턴 boolean

isAdmin() 공개 메소드

Test if user is admin
public isAdmin ( ) : boolean
리턴 boolean

isBanned() 공개 메소드

Test if user is banned
public isBanned ( ) : boolean
리턴 boolean

isCredentialsNonExpired() 공개 메소드

Checks if credentials are expired. We don't have this mechanism in Newscoop.
public isCredentialsNonExpired ( ) : boolean
리턴 boolean Not credentials expired status

isEnabled() 공개 메소드

Checks if the user account is enabled.
public isEnabled ( ) : boolean
리턴 boolean Active status

isEqualTo() 공개 메소드

public isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
$user Symfony\Component\Security\Core\User\UserInterface

isPending() 공개 메소드

Test if user is pending
public isPending ( ) : boolean
리턴 boolean

isPublic() 공개 메소드

Test if user is public
public isPublic ( ) : boolean
리턴 boolean

preUpdate() 공개 메소드

public preUpdate ( )

removeAttribute() 공개 메소드

Remove attribute
public removeAttribute ( string $name ) : Newscoop\Entity\UserAttribute
$name string
리턴 Newscoop\Entity\UserAttribute

rename() 공개 메소드

Rename user
public rename ( string $username ) : void
$username string
리턴 void

render() 공개 메소드

Render user
public render ( ) : UserView
리턴 Newscoop\View\UserView

serialize() 공개 메소드

public serialize ( )

setActive() 공개 메소드

Set user as active
public setActive ( ) : Newscoop\Entity\User
리턴 Newscoop\Entity\User

setAdmin() 공개 메소드

Set admin switch
public setAdmin ( boolean $admin ) : Newscoop\Entity\User
$admin boolean
리턴 Newscoop\Entity\User

setAttributes() 공개 메소드

Set User attributes
public setAttributes ( mixed $attributes )
$attributes mixed UserAttributes

setAuthor() 공개 메소드

Set author
public setAuthor ( Author $author = null ) : Newscoop\Entity\User
$author Author
리턴 Newscoop\Entity\User

setCity() 공개 메소드

Set city
public setCity ( string $city ) : string
$city string
리턴 string

setCountryCode() 공개 메소드

Set country code
public setCountryCode ( string $countryCode ) : string
$countryCode string
리턴 string

setEmail() 공개 메소드

Set email
public setEmail ( string $email ) : Newscoop\Entity\User
$email string
리턴 Newscoop\Entity\User

setFirstName() 공개 메소드

Set first name
public setFirstName ( string $first_name ) : Newscoop\Entity\User
$first_name string
리턴 Newscoop\Entity\User

setImage() 공개 메소드

Set image
public setImage ( string $image ) : Newscoop\Entity\User
$image string
리턴 Newscoop\Entity\User

setIndexed() 공개 메소드

Set indexed
public setIndexed ( DateTime $indexed = null ) : self
$indexed DateTime
리턴 self

setLastLogin() 공개 메소드

Set lastLogin
public setLastLogin ( DateTime $lastLogin = null ) : void
$lastLogin DateTime
리턴 void

setLastName() 공개 메소드

Set last name
public setLastName ( string $last_name ) : Newscoop\Entity\User
$last_name string
리턴 Newscoop\Entity\User

setPassword() 공개 메소드

Set password
public setPassword ( string $password ) : Newscoop\Entity\User
$password string
리턴 Newscoop\Entity\User

setPhone() 공개 메소드

Set phone
public setPhone ( string $phone ) : string
$phone string
리턴 string

setPoints() 공개 메소드

Set points
public setPoints ( integer $points ) : Newscoop\Entity\User
$points integer
리턴 Newscoop\Entity\User

setPostal() 공개 메소드

Set postal code
public setPostal ( string $postal ) : string
$postal string
리턴 string

setPublic() 공개 메소드

Set user is public
public setPublic ( boolean $public = true ) : Newscoop\Entity\User
$public boolean
리턴 Newscoop\Entity\User

setPublication() 공개 메소드

Set publication which user registered with
public setPublication ( integer $publication ) : integer
$publication integer Publication id
리턴 integer

setResetToken() 공개 메소드

Set password reset token
public setResetToken ( integer $resetToken ) : string
$resetToken integer
리턴 string

setRole() 공개 메소드

Set role
public setRole ( Role $role ) : Newscoop\Entity\User
$role Newscoop\Entity\Acl\Role
리턴 Newscoop\Entity\User

setState() 공개 메소드

Set state
public setState ( string $state ) : string
$state string
리턴 string

setStatus() 공개 메소드

Set status
public setStatus ( integer $status ) : Newscoop\Entity\User
$status integer
리턴 Newscoop\Entity\User

setStreet() 공개 메소드

Set street address
public setStreet ( string $street ) : string
$street string
리턴 string

setSubscriber() 공개 메소드

Set subscriber
public setSubscriber ( integer $subscriber ) : Newscoop\Entity\User
$subscriber integer
리턴 Newscoop\Entity\User

setUsername() 공개 메소드

Set username
public setUsername ( string $username ) : Newscoop\Entity\User
$username string
리턴 Newscoop\Entity\User

unserialize() 공개 메소드

public unserialize ( $data )

updateProfile() 공개 메소드

Update user profile
public updateProfile ( string $username, string $password, string $firstName, string $lastName, string $image, array $attributes )
$username string
$password string
$firstName string
$lastName string
$image string
$attributes array

프로퍼티 상세

$attributes 보호되어 있는 프로퍼티

protected Doctrine\Common\Collections\Collection; $attributes
리턴 Doctrine\Common\Collections\Collection;

$author 보호되어 있는 프로퍼티

protected Newscoop\Entity\Author $author
리턴 Newscoop\Entity\Author

$city 보호되어 있는 프로퍼티

protected string $city
리턴 string

$clients 보호되어 있는 프로퍼티

protected Newscoop\Package\Package $clients
리턴 Newscoop\Package\Package

$commenters 보호되어 있는 프로퍼티

protected Doctrine\Common\Collections\Collection; $commenters
리턴 Doctrine\Common\Collections\Collection;

$countryCode 보호되어 있는 프로퍼티

protected string $countryCode
리턴 string

$created 보호되어 있는 프로퍼티

protected DateTime $created
리턴 DateTime

$email 보호되어 있는 프로퍼티

protected string $email
리턴 string

$first_name 보호되어 있는 프로퍼티

protected string $first_name
리턴 string

$groups 보호되어 있는 프로퍼티

protected Doctrine\Common\Collections\Collection; $groups
리턴 Doctrine\Common\Collections\Collection;

$id 보호되어 있는 프로퍼티

protected int $id
리턴 integer

$identities 보호되어 있는 프로퍼티

protected Doctrine\Common\Collections\Collection $identities
리턴 Doctrine\Common\Collections\Collection

$image 공개적으로 프로퍼티

public string $image
리턴 string

$indexed 보호되어 있는 프로퍼티

protected DateTime $indexed
리턴 DateTime

$is_admin 보호되어 있는 프로퍼티

protected bool $is_admin
리턴 boolean

$is_public 보호되어 있는 프로퍼티

protected bool $is_public
리턴 boolean

$lastLogin 보호되어 있는 프로퍼티

protected DateTime $lastLogin
리턴 DateTime

$last_name 보호되어 있는 프로퍼티

protected string $last_name
리턴 string

$password 보호되어 있는 프로퍼티

protected string $password
리턴 string

$phone 보호되어 있는 프로퍼티

protected string $phone
리턴 string

$points 보호되어 있는 프로퍼티

protected int $points
리턴 integer

$postal 보호되어 있는 프로퍼티

protected string $postal
리턴 string

$publication 보호되어 있는 프로퍼티

protected int $publication
리턴 integer

$resetToken 보호되어 있는 프로퍼티

protected string $resetToken
리턴 string

$role 보호되어 있는 프로퍼티

protected Role,Newscoop\Entity\Acl $role
리턴 Newscoop\Entity\Acl\Role

$state 보호되어 있는 프로퍼티

protected string $state
리턴 string

$status 보호되어 있는 프로퍼티

protected int $status
리턴 integer

$street 보호되어 있는 프로퍼티

protected string $street
리턴 string

$subscriber 보호되어 있는 프로퍼티

protected int $subscriber
리턴 integer

$topics 보호되어 있는 프로퍼티

protected ArrayCollection,Doctrine\Common\Collections $topics
리턴 Doctrine\Common\Collections\ArrayCollection

$updated 보호되어 있는 프로퍼티

protected DateTime $updated
리턴 DateTime

$username 보호되어 있는 프로퍼티

protected string $username
리턴 string