Auth_OpenID_Association::__construct PHP Метод

__construct() публичный Метод

The library should create all of the necessary associations, so this constructor is not part of the external API.
public __construct ( string $handle, string $secret, integer $issued, integer $lifetime, string $assoc_type )
$handle string This is the handle the server gave this association.
$secret string This is the shared secret the server generated for this association.
$issued integer This is the time this association was issued, in seconds since 00:00 GMT, January 1, 1970. (ie, a unix timestamp)
$lifetime integer This is the amount of time this association is good for, measured in seconds since the association was issued.
$assoc_type string This is the type of association this instance represents. The only valid values of this field at this time is 'HMAC-SHA1' and 'HMAC-SHA256', but new types may be defined in the future.
    function __construct($handle, $secret, $issued, $lifetime, $assoc_type)
    {
        if (!in_array($assoc_type, Auth_OpenID_getSupportedAssociationTypes(), true)) {
            $fmt = 'Unsupported association type (%s)';
            trigger_error(sprintf($fmt, $assoc_type), E_USER_ERROR);
        }
        $this->handle = $handle;
        $this->secret = $secret;
        $this->issued = $issued;
        $this->lifetime = $lifetime;
        $this->assoc_type = $assoc_type;
    }