クラス
Factory
CustomerPage
factory
ソース ソース
ファイル: src/Views/CustomerPage/Factory.php
class Factory { /** * Returns `CustomerPage` instance for the given theme * * @author Evan D Shaw <evandanielshaw@gmail.com> * @param AmazonPay $module * @return CustomerPage */ public function getInstance(AmazonPay $module) { $instance = null; $theme = AmazonPay::getThemeConfig()['stylesheet']; switch ($theme) { case Constants::TCD_GLOMOUR: $instance = new Themes\TcdGlamour($module); break; case Constants::TCD_ICONIC: $instance = new Themes\TcdIconic($module); break; case Constants::TCD_EGO: $instance = new Themes\TcdEgo($module); break; default: $instance = new CustomerPage($module); break; } return $instance; } }
- getInstance — Returns CustomerPage instance for the given theme