クラス
Factory
Review factoryソース ソース
ファイル: src/Views/ConfirmPageReview/Factory.php
class Factory
{
/**
* Returns `Review` instance for the given theme
*
* @author Evan D Shaw <evandanielshaw@gmail.com>
* @param AmazonPay $module
* @return Review
*/
public function getInstance(AmazonPay $module) {
$instance = null;
$theme = AmazonPay::getThemeConfig()['name'];
switch ($theme) {
case 'beldad':
$instance = new Themes\Beldad($module);
break;
case 'carina':
$instance = new Themes\Carina($module);
break;
case 'nova':
$instance = new Themes\Nova($module);
break;
case 'square':
$instance = new Themes\Square($module);
break;
case 'voll':
$instance = new Themes\Voll($module);
break;
case 'panetteria':
$instance = new Themes\Panetteria($module);
break;
default:
$instance = new Review($module);
break;
}
return $instance;
}
}
- getInstance — Returns `Review` instance for the given theme