SiteFlagsTrait uses trait:short
Answers, on a site, what role it plays for the party that owns it.
One address bills, another receives the goods, a third is a construction site. A site may claim several of these at once, and — this is the part that bites — it may claim none: a record whose list was never filled in answers false everywhere, which is a fact about the record, not about the place.
Tags
Table of Contents
Methods
- getAdditionalPropertyValue() : mixed
- The value stored under the given property id, or null when absent.
- hasAdditionalPropertyFlag() : bool
- Whether the given property id is stored as a true flag.
- isBillingAddress() : bool
- Whether this site is the billing address.
- isConstructionSite() : bool
- Whether this site is a construction site.
- isDefaultAddress() : bool
- Whether this site is the default address.
- isDeliveryAddress() : bool
- Whether this site receives the deliveries.
- isShippingAddress() : bool
- Whether this site is the shipping address.
Methods
getAdditionalPropertyValue()
The value stored under the given property id, or null when absent.
public
getAdditionalPropertyValue(string $propertyID) : mixed
Parameters
- $propertyID : string
-
The
propertyIDto look for.
Return values
mixed —The stored value, or null when the thing carries no such entry.
hasAdditionalPropertyFlag()
Whether the given property id is stored as a true flag.
public
hasAdditionalPropertyFlag(string $propertyID) : bool
Tolerant on purpose: the value may come back as a real boolean, as the
string "1", or as the number 1, depending on how the thing was built.
An absent entry is false — nothing was claimed.
Parameters
- $propertyID : string
-
The
propertyIDto look for.
Return values
boolisBillingAddress()
Whether this site is the billing address.
public
isBillingAddress() : bool
Return values
boolisConstructionSite()
Whether this site is a construction site.
public
isConstructionSite() : bool
Return values
boolisDefaultAddress()
Whether this site is the default address.
public
isDefaultAddress() : bool
Return values
boolisDeliveryAddress()
Whether this site receives the deliveries.
public
isDeliveryAddress() : bool
Return values
boolisShippingAddress()
Whether this site is the shipping address.
public
isShippingAddress() : bool