Crypt_GPG
[ class tree: Crypt_GPG ] [ index: Crypt_GPG ] [ all elements ]

Class: Crypt_GPG_UserId

Source Location: /Crypt_GPG-1.4.0b4/Crypt/GPG/UserId.php

Class Overview


A class for GPG user id information


Author(s):

Copyright:

  • 2008-2010 silverorange

Methods


Inherited Variables

Inherited Methods


Class Details

[line 52]
A class for GPG user id information

This class is used to store the results of the Crypt_GPG::getKeys() method. User id objects are members of a Crypt_GPG_Key object.



[ Top ]


Method Detail

__construct (Constructor)   [line 110]

Crypt_GPG_UserId __construct( [Crypt_GPG_UserId|string|array $userId = null])

Creates a new user id

User ids can be initialized from an array of named values. Available names are:

  • string name - the name field of the user id.
  • string comment - the comment field of the user id.
  • string email - the email field of the user id.
  • boolean valid - whether or not the user id is valid.
  • boolean revoked - whether or not the user id is revoked.

  • Access: public

Parameters:

Crypt_GPG_UserId|string|array   $userId     optional. Either an existing user id object, which is copied; a user id string, which is parsed; or an array of initial values.

[ Top ]

getComment   [line 171]

string getComment( )

Gets the comments field of this user id
  • Return: the comments field of this user id.
  • Access: public

[ Top ]

getEmail   [line 184]

string getEmail( )

Gets the email field of this user id
  • Return: the email field of this user id.
  • Access: public

[ Top ]

getName   [line 158]

string getName( )

Gets the name field of this user id
  • Return: the name field of this user id.
  • Access: public

[ Top ]

isRevoked   [line 197]

boolean isRevoked( )

Gets whether or not this user id is revoked
  • Return: true if this user id is revoked and false if it is not.
  • Access: public

[ Top ]

isValid   [line 210]

boolean isValid( )

Gets whether or not this user id is valid
  • Return: true if this user id is valid and false if it is not.
  • Access: public

[ Top ]

parse   [line 339]

Crypt_GPG_UserId parse( string $string)

Parses a user id object from a user id string

A user id string is of the form: <kbd>name (comment) <email-address></kbd> with the comment and email-address fields being optional.

  • Return: the user id object parsed from the string.
  • Access: public

Parameters:

string   $string     the user id string to parse.

[ Top ]

setComment   [line 271]

Crypt_GPG_UserId setComment( string $comment)

Sets the comment field of this user id
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $comment     the comment field of this user id.

[ Top ]

setEmail   [line 287]

Crypt_GPG_UserId setEmail( string $email)

Sets the email field of this user id
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $email     the email field of this user id.

[ Top ]

setName   [line 255]

Crypt_GPG_UserId setName( string $name)

Sets the name field of this user id
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $name     the name field of this user id.

[ Top ]

setRevoked   [line 303]

Crypt_GPG_UserId setRevoked( boolean $isRevoked)

Sets whether or not this user id is revoked
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

boolean   $isRevoked     whether or not this user id is revoked.

[ Top ]

setValid   [line 319]

Crypt_GPG_UserId setValid( boolean $isValid)

Sets whether or not this user id is valid
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

boolean   $isValid     whether or not this user id is valid.

[ Top ]

__toString   [line 226]

string __toString( )

Gets a string representation of this user id

The string is formatted as: <kbd>name (comment) <email-address></kbd>.

  • Return: a string representation of this user id.
  • Access: public

[ Top ]


Documentation generated on Wed, 13 Mar 2013 18:30:12 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.