actions[] = $action; return $this; } /** * Get the number of actions in the sequence. * * @return int The number of actions. */ public function getNumberOfActions() { return count($this->actions); } /** * Perform the sequence of actions. */ public function perform() { foreach ($this->actions as $action) { $action->perform(); } } }