PHP Интерфейс Buyable, silvershop-core

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
canPurchase ( Member | null $member = null, integer $quantity = 1 ) : boolean Checks if the buyable can be purchased. If a buyable cannot be purchased then the method should return false
createItem ( integer $quantity = 1, array $filter = [] ) : OrderItem Create a new OrderItem to add to an order.
sellingPrice ( ) : ShopCurrency The price the customer gets this buyable for, with any additional additions or subtractions.

Описание методов

canPurchase() публичный Метод

Checks if the buyable can be purchased. If a buyable cannot be purchased then the method should return false
public canPurchase ( Member | null $member = null, integer $quantity = 1 ) : boolean
$member Member | null the Member that wants to purchase the buyable. Defaults to null
$quantity integer the quantity to purchase. Defaults to 1
Результат boolean true if the buyable can be purchased

createItem() публичный Метод

Create a new OrderItem to add to an order.
public createItem ( integer $quantity = 1, array $filter = [] ) : OrderItem
$quantity integer
$filter array
Результат OrderItem new OrderItem object

sellingPrice() публичный Метод

The price the customer gets this buyable for, with any additional additions or subtractions.
public sellingPrice ( ) : ShopCurrency
Результат ShopCurrency