PHP Class Transport\Entity\Transportations

Mostrar archivo Open project: opendatach/transport Class Usage Examples

Public Methods

Method Description
reduceTransportations ( string[] $transportations = [], integer $limit = 16, boolean $lsb0 = true ) : string Converts a list of transportation strings into a bitmask accepted by the SBB.
reduceTransportationsDec ( $transportations = [], $limit = 16 )

Method Details

reduceTransportations() public static method

Converts a list of transportation strings into a bitmask accepted by the SBB.
public static reduceTransportations ( string[] $transportations = [], integer $limit = 16, boolean $lsb0 = true ) : string
$transportations string[] A list of transportations
$limit integer Maximum number of transportations (bits)
$lsb0 boolean Least significant bit first, LSB 0
return string A binary representation of the transportations given

reduceTransportationsDec() public static method

public static reduceTransportationsDec ( $transportations = [], $limit = 16 )