CreateConfirmationsCommand Class Reference
[Confirmations]
Create a confirmation. More...
Inheritance diagram for
CreateConfirmationsCommand:
Protected Member Functions |
|
do_execute () | |
Execute this command. |
Detailed Description
Create a confirmation.
Definition at line 9 of file create.cmd.php.
Member Function Documentation
CreateConfirmationsCommand::do_execute | ( | ) | [protected] |
Execute this command.
Reimplemented from CommandChain.
Definition at line 13 of file create.cmd.php.
00013 { 00014 $ret = new Status(); 00015 00016 $confirmation = new DAOConfirmations(); 00017 $params = $this->get_params(); 00018 $params['code'] = Common::create_token(); // Tokens must not be unique! 00019 $params['expirationdate'] = Arr::get_item($params, 'expirationdate', time() + GyroDate::ONE_DAY); // 24 hours default expiration 00020 00021 Load::commands('generics/create'); 00022 $cmd = new CreateCommand('confirmations', $params); 00023 $ret->merge($cmd->execute()); 00024 $this->set_result($cmd->get_result()); 00025 00026 if ($ret->is_ok()) { 00027 $confirmation = $this->get_result(); 00028 $handler = $confirmation->create_handler(); 00029 $ret->merge($handler->created()); 00030 } 00031 00032 //$this->set_result($confirmation); 00033 return $ret; 00034 }
The documentation for this class was generated from the following file:
- contributions/confirmations/behaviour/commands/confirmations/create.cmd.php