Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitModelUser

Core::Model::arbitModelUser

Class arbitModelUser

User model

User model

arbitBaseStruct
   |
   --arbitModelBase
      |
      --arbitModelUser
Author(s):
Version:   $Revision: 1670 $
License:   GPL

Member Variables

protected string $defaultFetchMethod = 'fetchUserData'
Method from the model class implementation used to fetch the requested data value for the constructed model. the data is actually requested from the model.

Method from the model class implementation used to fetch the requested data value for the constructed model. The method is called lazy, when the data is actually requested from the model. The here given method is used, when there is nor special callback defined in the $specialFetchMethods array.

protected array $properties = array(
'login' => null,
'email' => null,
'name' => null,
'valid' => null,
'auth_type' => null,
'auth_infos' => null,
'privileges' => null,
'settings' => null,
'persistenceToken' => null,
'revisions' => null,
)

Array containing the users properties

Array containing the users properties

protected array $specialFetchMethods = array(
'privileges' => 'fetchPrivileges',
)

Method from the model class implementation used to fetch the requested data value for the constructed model. the data is actually requested from the model. like:

Method from the model class implementation used to fetch the requested data value for the constructed model. The method is called lazy, when the data is actually requested from the model. The array should look like:

  1.   array(
  2.       'property' => 'callbackMethodName',
  3.       ...
  4.   )

Inherited Member Variables

From arbitModelBase
protected arbitModelBase::$id
protected arbitModelBase::$modifiedProperty
protected arbitModelBase::$static
protected arbitModelBase::$userModelProperties

Method Summary

public static array fetchAll( )
Fetch all users Static function to fetch an array with all users in the database. the returned users only the ID is set, and all other data will be fetched lazy on explicit request.
public static arbitModelUser findByLogin( $login )
Find user by login Find a user in the database by its login name and return the arbitModelUser, or throw an exception.
public mixed create( )
Method called to create a new instance in the backend.
protected void fetchPrivileges( )
Fetch the basic user data
protected void fetchUserData( )
Fetch the basic user data
public string getPersistenceToken( )
Create and return new persistence token Creates a sufficently random persistence token, stores it for the user account and returns it, so it can be used for further actions.
public void storeChanges( )
Method called to store changes to the model.

Inherited Methods

From arbitModelBase
public void arbitModelBase::__construct()
Create model from identifier If the identifier of the model is known from somewhere in the application you may set it directly here instead of searching for some value.
public abstract void arbitModelBase::create()
Method called to create a new instance in the backend.
protected array arbitModelBase::getModifiedValues()
Return modified values Return an array with all values which has been modified on the current model instance, with their new values.
public abstract void arbitModelBase::storeChanges()
Method called to store changes to the model.
protected mixed arbitModelBase::toUserModel()
Transform value to user model(s) Transform a user ID or an array with user IDs in the a user mdoel, or an array of user models.
protected array arbitModelBase::transformUserProperties()
Transform all user properties Transform all iser IDs in the declared user properties into user models.
From arbitBaseStruct
protected void arbitBaseStruct::deepClone()
Deep clone array structures
public array arbitBaseStruct::getProperties()
Get property names Returns an arary with all properties defined in this struct.
public void arbitBaseStruct::__clone()
Method called, when struct ist cloned

Methods

fetchAll

static array fetchAll( )

Fetch all users Static function to fetch an array with all users in the database. the returned users only the ID is set, and all other data will be fetched lazy on explicit request.

Fetch all users Static function to fetch an array with all users in the database. In the returned users only the ID is set, and all other data will be fetched lazy on explicit request.

findByLogin

static arbitModelUser findByLogin( string $login )

Find user by login Find a user in the database by its login name and return the arbitModelUser, or throw an exception.

Find user by login Find a user in the database by its login name and return the arbitModelUser, or throw an exception.

Parameters:
Name Type Description
$login string

create

mixed create( )

Method called to create a new instance in the backend.

Method called to create a new instance in the backend. Method called when the model should be created in the backend the first time. This will normally throw an error if a model with the same identifier already exists in the backend. Returns the backend dependant identifier of the created user.

Redefinition of:
Method Description
arbitModelBase::create() Method called to create a new instance in the backend.

fetchPrivileges

void fetchPrivileges( )

Fetch the basic user data

Fetch the basic user data Fetch the basic user data

fetchUserData

void fetchUserData( )

Fetch the basic user data

Fetch the basic user data Fetch the basic user data

getPersistenceToken

string getPersistenceToken( )

Create and return new persistence token Creates a sufficently random persistence token, stores it for the user account and returns it, so it can be used for further actions.

Create and return new persistence token Creates a sufficently random persistence token, stores it for the user account and returns it, so it can be used for further actions.

storeChanges

void storeChanges( )

Method called to store changes to the model.

Method called to store changes to the model. Method called to store changes in the model to the backend. The method should only modify the backend data, if something really has been changed in the model. Use the __set() method, which should wrap all write access to the model, to remember write access.

Redefinition of:
Method Description
arbitModelBase::storeChanges() Method called to store changes to the model.
Documentation generated on Mon, 05 Apr 2010 14:02:21 +0200 by phpDocumentor 1.4.3