OpeningHours

class Firstred\PostNL\Entity\OpeningHours
Class OpeningHours.
Parent:

Firstred\PostNL\Entity\AbstractEntity

Implements:

ArrayAccess Iterator

Summary

Methods

Properties

private static property Firstred\PostNL\Entity\OpeningHours::$currentDay
public property Firstred\PostNL\Entity\OpeningHours::$defaultProperties
Type:

string[][]

protected static property Firstred\PostNL\Entity\OpeningHours::$Monday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Tuesday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Wednesday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Thursday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Friday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Saturday
Type:

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Sunday
Type:

string | array | null

Methods

public Firstred\PostNL\Entity\OpeningHours::__construct($Monday=null, $Tuesday=null, $Wednesday=null, $Thursday=null, $Friday=null, $Saturday=null, $Sunday=null)
OpeningHours constructor.
Parameters:
  • $Monday (string | array | null)

  • $Tuesday (string | array | null)

  • $Wednesday (string | array | null)

  • $Thursday (string | array | null)

  • $Friday (string | array | null)

  • $Saturday (string | array | null)

  • $Sunday (string | array | null)

public static Firstred\PostNL\Entity\OpeningHours::jsonDeserialize($json)
Deserialize opening hours
Parameters:
  • $json (stdClass)

Returns:

\Firstred\PostNL\Entity\OpeningHours

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.0.0

public Firstred\PostNL\Entity\OpeningHours::toArray()
Returns:

array

public Firstred\PostNL\Entity\OpeningHours::offsetExists($offset)
Parameters:
  • $offset (mixed)

Returns:

bool

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetGet($offset)
Parameters:
  • $offset (mixed)

Returns:

mixed

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetSet($offset, $value)
Parameters:
  • $offset (mixed)

  • $value (mixed)

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetUnset($offset)
Parameters:
  • $offset (mixed)

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::current()
Returns:

mixed

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::next()
Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::key()
Returns:

string

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::valid()
Returns:

bool

Since:

1.2.0

public Firstred\PostNL\Entity\OpeningHours::rewind()
Since:

1.2.0

private static Firstred\PostNL\Entity\OpeningHours::findCurrentDayString($currentDay)
Parameters:
  • $currentDay (mixed)

Returns:

string

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.2.0