PHP Class Transport\Entity\Schedule\Stop

Show file Open project: opendatach/transport Class Usage Examples

Public Properties

Property Type Description
$arrival string The arrival time to the checkpoint (e.g. 14:58:00).
$arrivalTimestamp integer
$delay integer
$departure string The departure time from the checkpoint, can be null.
$departureTimestamp integer
$location Transport\Entity\Location\Location
$platform string The arrival/departure platform (e.g. 8).
$prognosis Prognosis The checkpoint prognosis.
$realtimeAvailability string
$station Transport\Entity\Location\Station A location object showing this line's stop at the requested station.

Public Methods

Method Description
__construct ( )
calculateDateTime ( string $time, DateTime $referenceDate, $stopPrognosis = null ) : DateTime Calculates a datetime by parsing the time and date given.
createFromXml ( SimpleXMLElement $xml, DateTime $date, Stop $obj = null )

Method Details

__construct() public method

public __construct ( )

calculateDateTime() public static method

Calculates a datetime by parsing the time and date given.
public static calculateDateTime ( string $time, DateTime $referenceDate, $stopPrognosis = null ) : DateTime
$time string The time to parse, can contain an optional offset prefix (e.g., "02d")
$referenceDate DateTime The date
return DateTime The parsed time in ISO format

createFromXml() public static method

public static createFromXml ( SimpleXMLElement $xml, DateTime $date, Stop $obj = null )
$xml SimpleXMLElement
$date DateTime
$obj Stop

Property Details

$arrival public property

The arrival time to the checkpoint (e.g. 14:58:00).
public string $arrival
return string

$arrivalTimestamp public property

public int $arrivalTimestamp
return integer

$delay public property

public int $delay
return integer

$departure public property

The departure time from the checkpoint, can be null.
public string $departure
return string

$departureTimestamp public property

public int $departureTimestamp
return integer

$location public property

public Location,Transport\Entity\Location $location
return Transport\Entity\Location\Location

$platform public property

The arrival/departure platform (e.g. 8).
public string $platform
return string

$prognosis public property

The checkpoint prognosis.
public Prognosis,Transport\Entity\Schedule $prognosis
return Prognosis

$realtimeAvailability public property

public string $realtimeAvailability
return string

$station public property

A location object showing this line's stop at the requested station.
public Station,Transport\Entity\Location $station
return Transport\Entity\Location\Station