Time\Clock\ClockInterface 
-
Namespace
Phalcon\Time\Clock
-
Uses
DateTimeImmutable
-
Extends
-
Implements
This file is part of the Phalcon Framework.
(c) Phalcon Team <team@phalcon.io>
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
Methods
public function now(): DateTimeImmutable;Time\Clock\Exception
-
Namespace
Phalcon\Time\Clock
-
Uses
Throwable
-
Extends
\Exception -
Implements
This file is part of the Phalcon Framework.
(c) Phalcon Team <team@phalcon.io>
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
Methods
public static function invalidModifier( string $message, Throwable $ex = null ): Exception;Time\Clock\FrozenClock 
-
Namespace
Phalcon\Time\Clock
-
Uses
DateTimeImmutableDateTimeZoneThrowable
-
Extends
-
Implements
ClockInterface
This file is part of the Phalcon Framework.
(c) Phalcon Team <team@phalcon.io>
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
Properties
/**
* @var DateTimeImmutable
*/
private $now;Methods
public function __construct( DateTimeImmutable $now );public function adjust( string $modifier ): FrozenClock;Mutates the clock to a new value. All consumers receive the same modification
@throws Exception When the modifier string cannot be parsed
public static function fromSystemTimezone(): FrozenClock;Return a new object of now with the current timezone
public static function fromUTC(): FrozenClock;Return a new object of now with UTC
public function now(): DateTimeImmutable;Return the current clock
public function set( DateTimeImmutable $now ): FrozenClock;Sets the clock to a new value. All consumers receive the same modification
Time\Clock\SystemClock 
-
Namespace
Phalcon\Time\Clock
-
Uses
DateTimeImmutableDateTimeZone
-
Extends
-
Implements
ClockInterface
This file is part of the Phalcon Framework.
(c) Phalcon Team <team@phalcon.io>
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
Properties
/**
* @var DateTimeZone
*/
private $timezone;Methods
public function __construct( DateTimeZone $timezone );public static function fromSystemTimezone(): SystemClock;Return a new object of now with the current timezone
public static function fromUTC(): SystemClock;Return a new object of now with UTC
public function now(): DateTimeImmutable;Return the current clock