Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Last active December 7, 2020 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/c984be85538e6b3493dba27e01e2605c to your computer and use it in GitHub Desktop.
Save kurozumi/c984be85538e6b3493dba27e01e2605c to your computer and use it in GitHub Desktop.
会員ランクを決定するStrategy(会員タイプのインターフェース)
<?php
/**
* This file is part of CustomerType
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Plugin\CustomerType\Service\Customer;
use Eccube\Entity\Customer;
use Plugin\CustomerType\Entity\CustomerType;
interface CustomerTypeInterface
{
/**
* @return bool
*
* 会員タイプを決定する条件を実装
*/
public function verify(Customer $customer): bool;
/**
* @return CustomerType
*
* 会員タイプのオブジェクトを返す。
*/
public function getCustomerType(): CustomerType;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment