PHP Class Location\Formatter\Coordinate\DecimalMinutes

Author: Marcus Jaschen ([email protected])
Inheritance: implements Location\Formatter\Coordinate\FormatterInterface
显示文件 Open project: mjaschen/phpgeo Class Usage Examples

Protected Properties

Property Type Description
$decimalPoint string
$digits integer
$separator Separator string between latitude and longitude
$unitType string
$units array
$useCardinalLetters boolean Use cardinal letters for N/S and W/E instead of minus sign

Public Methods

Method Description
__construct ( string $separator = " " )
format ( Coordinate $coordinate ) : string
setDecimalPoint ( string $decimalPoint ) : DecimalMinutes
setDigits ( integer $digits ) : DecimalMinutes
setSeparator ( $separator ) : DecimalMinutes Sets the separator between latitude and longitude values
setUnits ( string $type )
useCardinalLetters ( boolean $value ) : DecimalMinutes

Protected Methods

Method Description
getLatPrefix ( $lat ) : string
getLatSuffix ( $lat ) : string
getLngPrefix ( $lng ) : string
getLngSuffix ( $lng ) : string

Method Details

__construct() public method

public __construct ( string $separator = " " )
$separator string

format() public method

public format ( Coordinate $coordinate ) : string
$coordinate Location\Coordinate
return string

getLatPrefix() protected method

protected getLatPrefix ( $lat ) : string
$lat
return string

getLatSuffix() protected method

protected getLatSuffix ( $lat ) : string
$lat
return string

getLngPrefix() protected method

protected getLngPrefix ( $lng ) : string
$lng
return string

getLngSuffix() protected method

protected getLngSuffix ( $lng ) : string
$lng
return string

setDecimalPoint() public method

public setDecimalPoint ( string $decimalPoint ) : DecimalMinutes
$decimalPoint string
return DecimalMinutes

setDigits() public method

public setDigits ( integer $digits ) : DecimalMinutes
$digits integer
return DecimalMinutes

setSeparator() public method

Sets the separator between latitude and longitude values
public setSeparator ( $separator ) : DecimalMinutes
$separator
return DecimalMinutes

setUnits() public method

public setUnits ( string $type )
$type string

useCardinalLetters() public method

public useCardinalLetters ( boolean $value ) : DecimalMinutes
$value boolean
return DecimalMinutes

Property Details

$decimalPoint protected_oe property

protected string $decimalPoint
return string

$digits protected_oe property

protected int $digits
return integer

$separator protected_oe property

Separator string between latitude and longitude
protected $separator

$unitType protected_oe property

protected string $unitType
return string

$units protected_oe property

protected array $units
return array

$useCardinalLetters protected_oe property

Use cardinal letters for N/S and W/E instead of minus sign
protected bool $useCardinalLetters
return boolean