InfoCard/Claims.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_InfoCard  
Version
$Id: Claims.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_InfoCard_Claims

Package: Zend\InfoCard
Result value of the InfoCard component, contains any error messages and claims from the processing of an information card.
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  RESULT_SUCCESS = 1
Successful validation and extraion of claims
>VConstant  RESULT_PROCESSING_FAILURE = 2
Indicates there was an error processing the XML document
>VConstant  RESULT_VALIDATION_FAILURE = 3
Indicates that the signature values within the XML document failed verification

Properties

>VPropertyprotectedarray $_claims
An array of claims taken from the information card
Details
Type
array
>VPropertyprotectedinteger $_code
The result code of processing the information card as defined by the constants of this class
Details
Type
integer
>VPropertyprotectedstring $_defaultNamespace = null
The default namespace to assume in these claims
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_error = ""
The error message if any
Default value""Details
Type
string
>VPropertyprotectedbool $_isValid = true
A boolean indicating if the claims should be consider "valid" or not based on processing
Default valuetrueDetails
Type
bool

Methods

methodpublic__get( $k) : void

Magic helper function

Parameters
NameTypeDescription
$k
methodpublic__isset( $k) : void

Magic helper function

Parameters
NameTypeDescription
$k
methodpublic__set( $k,  $v) : void

Magic helper function

Parameters
NameTypeDescription
$k
$v
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublic__unset( $k) : void

Magic helper function

Parameters
NameTypeDescription
$k
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicclaimExists(string $claimURI) : bool

Indicates if a specific claim URI exists or not within the object

Parameters
NameTypeDescription
$claimURIstring

The complete claim URI to check

Returns
TypeDescription
booltrue if the claim exists, false if not found
methodpublicforceValid() : \Zend_InfoCard_Claims

Override for the safeguard which ensures that you don't use claims which failed validation.

Used in situations when there was a validation error you'd like to ignore

Returns
TypeDescription
\Zend_InfoCard_Claims
methodpublicgetCardID() : string

Retrieve the PPI (Private Personal Identifier) associated with the information card

Returns
TypeDescription
stringthe private personal identifier
methodpublicgetClaim(string $claimURI) : mixed

Get a claim by providing its complete claim URI

Parameters
NameTypeDescription
$claimURIstring

The complete claim URI to retrieve

Returns
TypeDescription
mixedThe claim matching that specific URI or null if not found
methodpublicgetCode() : integer

Gets the result code of the claims object

Returns
TypeDescription
integerThe result code
methodpublicgetDefaultNamespace() : string

Retrieves the default namespace used in this information card.

If a default namespace was not set, it figures out which one to consider 'default' by taking the first namespace sorted by use-count in claims

Returns
TypeDescription
stringThe default namespace
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicgetErrorMsg() : string

Retrieve the error message contained within the claims object

Returns
TypeDescription
stringThe error message
methodpublicisValid() : bool

Indicates if this claim object contains validated claims or not

Returns
TypeDescription
bool
methodpublicsetClaims(array $claims) : \Zend_InfoCard_Claims

Set the claims for the claims object.

Can only be set once and is done by the component itself. Internal use only.

Parameters
NameTypeDescription
$claimsarray
Returns
TypeDescription
\Zend_InfoCard_Claims
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicsetCode(int $code) : \Zend_InfoCard_Claims

Set the result code of the claims object.

Parameters
NameTypeDescription
$codeint

The result code

Returns
TypeDescription
\Zend_InfoCard_Claims
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicsetDefaultNamespace(string $namespace) : \Zend_InfoCard_Claims

Set the default namespace, overriding any existing default

Parameters
NameTypeDescription
$namespacestring

The default namespace to use

Returns
TypeDescription
\Zend_InfoCard_Claims
Throws
ExceptionDescription
\Zend_InfoCard_Exception
methodpublicsetError(string $error) : \Zend_InfoCard_Claims

Set the error message contained within the claims object

Parameters
NameTypeDescription
$errorstring

The error message

Returns
TypeDescription
\Zend_InfoCard_Claims
Documentation was generated by phpDocumentor 2.0.0a12.