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

Class: Crypt_GPG_UserId

Source Location: /Crypt_GPG-1.6.0b3/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 51]
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 109]

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 170]

string getComment( )

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

[ Top ]

getEmail   [line 183]

string getEmail( )

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

[ Top ]

getName   [line 157]

string getName( )

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

[ Top ]

isRevoked   [line 196]

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 209]

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 338]

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 270]

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 286]

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 254]

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 302]

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 318]

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 225]

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 Tue, 06 Dec 2016 09:30:03 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.