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

Class: Crypt_GPG_ProcessHandler

Source Location: /Crypt_GPG-1.6.4/Crypt/GPG/ProcessHandler.php

Class Overview


Status/Error handler for GPG process pipes.


Author(s):

Copyright:

  • 2005-2013 silverorange

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 67]
Status/Error handler for GPG process pipes.

This class is used internally by Crypt_GPG_Engine and does not need to be used directly. See the Crypt_GPG class for end-user API.



[ Top ]


Class Variables

$data = array()

[line 103]

Some data collected while processing the operation or set for the operation
  • See: self::setData()
  • See: self::getData()
  • Access: protected

Type:   array


[ Top ]

$engine =

[line 76]

Engine used to control the GPG subprocess
  • Access: protected

Type:   Crypt_GPG_Engine


[ Top ]

$errorCode =  Crypt_GPG::ERROR_NONE

[line 83]

The error code of the current operation
  • Access: protected

Type:   integer


[ Top ]

$needPassphrase =  0

[line 93]

The number of currently needed passphrases

If this is not zero when the GPG command is completed, the error code is set to Crypt_GPG::ERROR_MISSING_PASSPHRASE.

  • Access: protected

Type:   integer


[ Top ]

$operation =  null

[line 111]

The name of the current operation
  • See: self::setOperation()
  • Access: protected

Type:   string


[ Top ]

$operationArg =  null

[line 119]

The value of the argument of current operation
  • See: self::setOperation()
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 129]

Crypt_GPG_ProcessHandler __construct( Crypt_GPG_Engine $engine)

Creates a new instance
  • Access: public

Parameters:

Crypt_GPG_Engine   $engine   —  Engine object

[ Top ]

badPassException   [line 870]

Crypt_GPG_BadPassphraseException badPassException( int $code, string $message)

Create Crypt_GPG_BadPassphraseException from operation data.
  • Access: protected

Parameters:

int   $code   —  Error code
string   $message   —  Error message

[ Top ]

getData   [line 823]

mixed getData( string $name)

Get data from the last process execution.
  • Access: public

Parameters:

string   $name   —  Data element name:
  • SigCreated: The last SIG_CREATED status.
  • KeyConsidered: The last KEY_CONSIDERED status identifier.
  • KeyCreated: The KEY_CREATED status (for specified Handle).
  • Signatures: Signatures data from verification process.
  • LineNumber: Number of the gen-key error line.
  • Import: Result of IMPORT_OK/IMPORT_RES
  • Warnings: An array of all collected GnuPG warnings

[ Top ]

getPin   [line 909]

string getPin( string $key)

Get registered passphrase for specified key.
  • Return: Passphrase
  • Access: protected

Parameters:

string   $key   —  Key identifier

[ Top ]

handleError   [line 472]

void handleError( string $line)

Handles error values in the error output from GPG

This method is responsible for setting the Crypt_GPG_Engine::$_errorCode.

  • Access: public

Parameters:

string   $line   —  the error line to handle.

[ Top ]

handleStatus   [line 190]

void handleStatus( string $line)

Handles error values in the status output from GPG

This method is responsible for setting the self::$errorCode. See doc/DETAILS in the GPG distribution for detailed information on GPG's status output.

  • Access: public

Parameters:

string   $line   —  the status line to handle.

[ Top ]

setData   [line 846]

void setData( string $name, mixed $value)

Set data for the process execution.
  • Access: public

Parameters:

string   $name   —  Data element name:
  • Handle: The unique key handle used by this handler The key handle is used to track GPG status output for a particular key on --gen-key command before the key has its own identifier.
  • IgnoreVerifyErrors: Do not throw exceptions when signature verification failes because of a missing public key.
mixed   $value   —  Data element value

[ Top ]

setErrorCode   [line 784]

int setErrorCode( int $exitcode)

Check exit code of the GPG operation.
  • Return: Internal error code
  • Access: protected

Parameters:

int   $exitcode   —  GPG process exit code

[ Top ]

setOperation   [line 144]

void setOperation( string $operation)

Sets the operation that is being performed by the engine.
  • Access: public

Parameters:

string   $operation   —  The GPG operation to perform.

[ Top ]

throwException   [line 553]

void throwException( [int $exitcode = 0])

On error throws exception
  • Throws: Crypt_GPG_Exception
  • Access: public

Parameters:

int   $exitcode   —  GPG process exit code

[ Top ]


Documentation generated on Sun, 22 Mar 2020 08:01:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.