Oihana PHP System

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
author

Marc Alcaraz (eKameleon)

since
1.4.0

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 propertyID to 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 propertyID to look for.

Return values
bool

isBillingAddress()

Whether this site is the billing address.

public isBillingAddress() : bool
Return values
bool

isConstructionSite()

Whether this site is a construction site.

public isConstructionSite() : bool
Return values
bool

isDefaultAddress()

Whether this site is the default address.

public isDefaultAddress() : bool
Return values
bool

isDeliveryAddress()

Whether this site receives the deliveries.

public isDeliveryAddress() : bool
Return values
bool

isShippingAddress()

Whether this site is the shipping address.

public isShippingAddress() : bool
Return values
bool
On this page

Search results