getAuthorAndTitle(); echo tagins("br").tagins("br"); $starsOn = new BookStarsOnCommand($book); callCommand($starsOn); echo "book after stars on: "; echo tagins("br"); echo $book->getAuthorAndTitle(); echo tagins("br").tagins("br"); $starsOff = new BookStarsOffCommand($book); callCommand($starsOff); echo "book after stars off: "; echo tagins("br"); echo $book->getAuthorAndTitle(); echo tagins("br"); echo tagins("br"); echo "END TESTING COMMAND PATTERN"; echo tagins("br"); echo tagins("/body"); echo tagins("/html"); //the callCommand function demonstrates that a specified // function in BookCommandee can be executed with only // an instance of BookCommand. function callCommand(BookCommand $bookCommand_in) { $bookCommand_in->execute(); } //doing this so code can be displayed without breaks function tagins($stuffing) { return "<".$stuffing.">"; } ?>