.

Tokens Class Reference

Facade for tokens. More...

List of all members.

Static Public Member Functions

static  create_token ($seed=false)
  Create a token for given context.

Detailed Description

Facade for tokens.

Definition at line 5 of file tokens.facade.php.


Member Function Documentation

static Tokens::create_token ( seed = false  )  [static]

Create a token for given context.

Parameters:
string  $context
string  $seed Optional extra seed for token

Definition at line 12 of file tokens.facade.php.

00012                                                            {
00013                 self::clear();
00014                 
00015                 $dao = new DAOTokens();
00016                 $token = '';
00017                 do {
00018                         $token = Common::create_token($seed);
00019                         $dao->token = $token;
00020                 } while ($dao->count() > 0);
00021                 
00022                 $cmd = CommandsFactory::create_command('tokens', 'create', array('token' => $token));
00023                 $cmd->execute();
00024                 
00025                 return $token;
00026         }

The documentation for this class was generated from the following file: