Gdata/Gapps/Extension/Login.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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Gdata  
Subpackage
Gapps  
Version
$Id$  

\Zend_Gdata_Gapps_Extension_Login

Package: Zend_Gdata\Gapps
Represents the apps:login element used by the Apps data API. This class is used to describe properties of a user, and is usually contained within instances of Zene_Gdata_Gapps_UserEntry or any other class which is linked to a particular username.
Parent(s)
\Zend_Gdata_Extension < \Zend_Gdata_App_Extension < \Zend_Gdata_App_Base
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedboolean $_admin = null
True if the user has administrative rights for this domain, false otherwise.
Default valuenullDetails
Type
boolean
>VPropertyprotected\boolean. $_agreedToTerms = null
True if the user has agreed to the terms of service for Google Apps, false otherwise.
Default valuenullDetails
Type
\boolean.
>VPropertyprotectedboolean $_changePasswordAtNextLogin = null
True if the user will be required to change their password at their next login, false otherwise.
Default valuenullDetails
Type
boolean
>VPropertyprotectedstring $_hashFunctionName = null
Specifies whether the password stored in _password is in cleartext or is an SHA-1 digest of a password. If the password is cleartext, then this should be null. If the password is an SHA-1 digest, then this should be set to 'SHA-1'.
At the time of writing, no other hash functions are supported
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_password = null
The password for the user. May be in cleartext or as an SHA-1 digest, depending on the value of _hashFunctionName.
Default valuenullDetails
Type
string
>VPropertyprotected$_rootElement = 'login'
Default value'login'Details
Type
n/a
>VPropertyprotected$_rootNamespace = 'apps'
Default value'apps'Details
Type
n/a
>VPropertyprotectedboolean $_suspended = null
True if this user has been suspended, false otherwise.
Default valuenullDetails
Type
boolean
>VPropertyprotectedstring $_username = null
The username for this user. This is used as the user's email address and when logging in to Google Apps-hosted services.
Default valuenullDetails
Type
string

Methods

methodpublic__construct(string $username = null, string $password = null, string $hashFunctionName = null, boolean $admin = null, boolean $suspended = null, boolean $changePasswordAtNextLogin = null, boolean $agreedToTerms = null) : void

Constructs a new Zend_Gdata_Gapps_Extension_Login object.

Parameters
NameTypeDescription
$usernamestring

(optional) The username to be used for this

     login.
$passwordstring

(optional) The password to be used for this

     login.
$hashFunctionNamestring

(optional) The name of the hash

     function used to protect the password, or null if no
     has function has been applied. As of this writing,
     the only valid values are 'SHA-1' or null.
$adminboolean

(optional) Whether the user is an administrator

     or not.
$suspendedboolean

(optional) Whether this login is suspended or not.

$changePasswordAtNextLoginboolean

(optional) Whether

     the user is required to change their password at their
     next login.
$agreedToTermsboolean

(optional) Whether the user has

     agreed to the terms of service.
methodpublic__toString() : void

Magic toString method allows using this directly via echo Works best in PHP >= 4.2.0

methodpublicgetAdmin() : boolean

Get the value for this element's admin attribute.

Returns
TypeDescription
booleanThe requested attribute.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
Details
See
 
methodpublicgetAgreedToTerms() : boolean

Get the value for this element's agreedToTerms attribute.

Returns
TypeDescription
booleanThe requested attribute.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
Details
See
 
methodpublicgetChangePasswordAtNextLogin() : boolean

Get the value for this element's changePasswordAtNextLogin attribute.

Returns
TypeDescription
booleanThe requested attribute.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
Details
See
 
methodpublicgetDOM(\DOMDocument $doc = null,  $majorVersion = 1,  $minorVersion = null) : \DOMElement

Retrieves a DOMElement which corresponds to this element and all child properties. This is used to build an entry back into a DOM and eventually XML text for sending to the server upon updates, or for application storage/persistence.

Parameters
NameTypeDescription
$doc\DOMDocument

The DOMDocument used to construct DOMElements

$majorVersion
$minorVersion
Returns
TypeDescription
\DOMElementThe DOMElement representing this element and all child properties.
methodpublicgetHashFunctionName() : string

Get the value for this element's hashFunctionName attribute.

Returns
TypeDescription
stringThe requested attribute.
Details
See
 
methodpublicgetPassword() : string

Get the value for this element's password attribute.

Returns
TypeDescription
stringThe requested attribute.
Details
See
 
methodpublicgetSuspended() : boolean

Get the value for this element's suspended attribute.

Returns
TypeDescription
booleanThe requested attribute.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
Details
See
 
methodpublicgetUsername() : string

Get the value for this element's username attribute.

Returns
TypeDescription
stringThe attribute being modified.
Details
See
 
methodpublicsetAdmin(boolean $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's admin attribute. This indicates whether this user is an administrator for this domain.

Parameters
NameTypeDescription
$valueboolean

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
methodpublicsetAgreedToTerms(boolean $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's agreedToTerms attribute. This indicates whether this user has agreed to the terms of service.

Parameters
NameTypeDescription
$valueboolean

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
methodpublicsetChangePasswordAtNextLogin(boolean $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's changePasswordAtNextLogin attribute.

If true, the user will be forced to set a new password the next time they login.
Parameters
NameTypeDescription
$valueboolean

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
methodpublicsetHashFunctionName(string $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's hashFunctionName attribute. This indicates whether the password supplied with setPassword() is in plaintext or has had a hash function applied to it. If null, plaintext is assumed. As of this writing, the only valid hash function is 'SHA-1'.

Parameters
NameTypeDescription
$valuestring

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
methodpublicsetPassword(string $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's password attribute. As of this writing, this can be either be provided as plaintext or hashed using the SHA-1 algorithm for protection. If using a hash function, this must be indicated by calling setHashFunctionName().

Parameters
NameTypeDescription
$valuestring

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
methodpublicsetSuspended(boolean $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's suspended attribute. If true, the user will not be able to login to this domain until unsuspended.

Parameters
NameTypeDescription
$valueboolean

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
methodpublicsetUsername(string $value) : \Zend_Gdata_Gapps_Extension_Login

Set the value for this element's username attribute. This string is used to uniquely identify the user in this domian and is used to form this user's email address.

Parameters
NameTypeDescription
$valuestring

The desired value for this attribute.

Returns
TypeDescription
\Zend_Gdata_Gapps_Extension_LoginProvides a fluent interface.
methodprotectedtakeAttributeFromDOM(\DOMNode $attribute) : void

Given a DOMNode representing an attribute, tries to map the data into instance members. If no mapping is defined, the name and value are stored in an array.

Parameters
NameTypeDescription
$attribute\DOMNode

The DOMNode attribute needed to be handled

Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
Documentation was generated by phpDocumentor 2.2.0 .