make concrete journey

This commit is contained in:
Trismegiste 2013-05-12 11:13:37 +02:00
parent 1569db1328
commit 1ab184fca7
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
/*
* DesignPatternPHP
*/
namespace DesignPatterns\TemplateMethod;
/**
* BeachJourney is vacation at the beach
*/
class BeachJourney extends Journey
{
protected function enjoyVacation()
{
echo "Swimming and sun-bathing\n";
}
}

View File

@ -0,0 +1,20 @@
<?php
/*
* DesignPatternPHP
*/
namespace DesignPatterns\TemplateMethod;
/**
* CityJouney is a journey in a city
*/
class CityJouney extends Journey
{
protected function enjoyVacation()
{
echo "Eat, drink, take photos and sleep\n";
}
}