vendredi 21 octobre 2016

Command pattern abstract method

This is part of command pattern described in a book about patterns. It is fairly clear... But, why does call doExecute from execute method?

abstract class Command { final function __construct() {}

public function execute(Request $request) 
{
    $this->doExecute($request) ;
} 

abstract public function doExecute(Request $request) ;

}

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire