Skip to content

Orisai Clock and Symfony Clock integration for Nette

License

Notifications You must be signed in to change notification settings

orisai/nette-clock

Repository files navigation

Orisai
Nette Clock

Orisai Clock and Symfony Clock integration for Nette

PSR-20 compatible

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Orisai\Clock\Clock;
use function Orisai\Clock\now;

class ExampleService
{

	private Clock $clock;

	public function __construct(Clock $clock)
	{
		$this->clock = $clock;
	}

	public function doSomething(): void
	{
		$currentTime = $this->clock->now();
		// Or
		$currentTime = now();
	}

}