phpcr/src/PHPCR/SimpleCredentials.php

Show: PublicProtectedPrivateinherited
Table of Contents
This file is part of the PHPCR API and was originally ported from the Java JCR API to PHP by Karsten Dambekalns for the FLOW3 project.

Copyright 2008-2011 Karsten Dambekalns karsten@typo3.org

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

License
Apache Software License 2.0  
Link
http://phpcr.github.com/  

\PHPCR\SimpleCredentials

Package: Default
SimpleCredentials implements the Credentials interface and represents simple user ID/password credentials.
Implements
\PHPCR\CredentialsInterface
Api
 
Author
Karsten Dambekalns  

Properties

>VPropertyprivatearray $attributes = array()
Container to store properties.
Default valuearray()Details
Type
array
>VPropertyprivatestring $password
Unique string used to authenticate the user.
Details
Type
string
>VPropertyprivatestring $userID
Unique identifier of a user.
Details
Type
string

Methods

methodpublic__construct(string $userID, string $password) : void

The constructor creates a new SimpleCredentials object, given a user ID and password.

Parameters
NameTypeDescription
$userIDstring

the user ID

$passwordstring

the user's password

Details
Api
 
methodpublicgetAttribute(string $name) : mixed

Returns the value of the named attribute, or null if no attribute of the given name exists.

Parameters
NameTypeDescription
$namestring

the name of the attribute

Returns
TypeDescription
mixedthe value of the attribute, or null if the attribute does not exist
Details
Api
 
methodpublicgetAttributeNames() : array

Returns the names of the attributes available to this credentials instance.

This method returns an empty array if the credentials instance has no attributes available to it.

Returns
TypeDescription
arraya string array containing the names of the stored attributes
Details
Api
 
methodpublicgetPassword() : string

Returns the user password.

Returns
TypeDescription
stringthe password
Details
Api
 
methodpublicgetUserID() : string

Returns the user ID.

Returns
TypeDescription
stringthe user ID.
Details
Api
 
methodpublicremoveAttribute(string $name) : void

Removes an attribute from this credentials instance.

Parameters
NameTypeDescription
$namestring

the name of the attribute to remove

Details
Api
 
methodpublicsetAttribute(string $name, mixed $value) : void

Stores an attribute in this credentials instance.

Note: If no value is passed, the attribute will be removed.

Parameters
NameTypeDescription
$namestring

the name of the attribute

$valuemixed

the value to be stored

Details
Api
 
Documentation was generated by phpDocumentor 2.0.0a12.