.

CommandChainAdapter Class Reference

Adapt any command to be chainable. More...

Inheritance diagram for CommandChainAdapter:
CommandChain CommandBase ICommand IAction ISerializable

List of all members.

Public Member Functions

  __construct ($cmd)
  Constructor.

Protected Member Functions

  do_can_execute ($user)
  Does execution checking.
  do_execute ()
  Does executing.
  do_undo ()
  Does undo.

Protected Attributes

  $cmd = null

Detailed Description

Adapt any command to be chainable.

Definition at line 167 of file commandchain.cls.php.


Constructor & Destructor Documentation

CommandChainAdapter::__construct ( cmd  ) 

Constructor.

Parameters:
ICommand  Command to adapt

Definition at line 180 of file commandchain.cls.php.

00180                                           {
00181                 if ($cmd instanceof ICommand) {
00182                         $this->cmd = $cmd;
00183                 }
00184         }

Member Function Documentation

CommandChainAdapter::do_can_execute ( user  )  [protected]

Does execution checking.

Reimplemented from CommandChain.

Definition at line 189 of file commandchain.cls.php.

00189                                                  {
00190                 if ($this->cmd) {
00191                         return $this->cmd->can_execute($user);
00192                 }
00193                 return parent::do_can_execute($user);
00194         }
CommandChainAdapter::do_execute (  )  [protected]

Does executing.

Reimplemented from CommandChain.

Definition at line 199 of file commandchain.cls.php.

00199                                         {
00200                 if ($this->cmd) {
00201                         return $this->cmd->execute();
00202                 }
00203                 return parent::do_execute();
00204         } 
CommandChainAdapter::do_undo (  )  [protected]

Does undo.

Reimplemented from CommandChain.

Definition at line 209 of file commandchain.cls.php.

00209                                      {
00210                 if ($this->cmd) {
00211                         return $this->cmd->undo(); 
00212                 }
00213                 return parent::do_undo();
00214         }

Member Data Documentation

CommandChainAdapter::$cmd = null [protected]

Definition at line 173 of file commandchain.cls.php.


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