pax_global_header00006660000000000000000000000064143401513520014510gustar00rootroot0000000000000052 comment=e41a24703d4560fd0acb709162f73b8adfc3aa0d clock-1.0.0/000077500000000000000000000000001434015135200126015ustar00rootroot00000000000000clock-1.0.0/CHANGELOG.md000066400000000000000000000003161434015135200144120ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file, in reverse chronological order by release. ## 1.0.0 First stable release after PSR-20 acceptance ## 0.1.0 First release clock-1.0.0/LICENSE000066400000000000000000000020701434015135200136050ustar00rootroot00000000000000Copyright (c) 2017 PHP Framework Interoperability Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. clock-1.0.0/README.md000066400000000000000000000027441434015135200140670ustar00rootroot00000000000000# PSR Clock This repository holds the interface for [PSR-20][psr-url]. Note that this is not a clock of its own. It is merely an interface that describes a clock. See the specification for more details. ## Installation ```bash composer require psr/clock ``` ## Usage If you need a clock, you can use the interface like this: ```php clock = $clock; } public function doSomething() { /** @var DateTimeImmutable $currentDateAndTime */ $currentDateAndTime = $this->clock->now(); // do something useful with that information } } ``` You can then pick one of the [implementations][implementation-url] of the interface to get a clock. If you want to implement the interface, you can require this package and implement `Psr\Clock\ClockInterface` in your code. Don't forget to add `psr/clock-implementation` to your `composer.json`s `provides`-section like this: ```json { "provides": { "psr/clock-implementation": "1.0" } } ``` And please read the [specification text][specification-url] for details on the interface. [psr-url]: https://www.php-fig.org/psr/psr-20 [package-url]: https://packagist.org/packages/psr/clock [implementation-url]: https://packagist.org/providers/psr/clock-implementation [specification-url]: https://github.com/php-fig/fig-standards/blob/master/proposed/clock.md clock-1.0.0/composer.json000066400000000000000000000006601434015135200153250ustar00rootroot00000000000000{ "name": "psr/clock", "description": "Common interface for reading the clock.", "keywords": ["psr", "psr-20", "time", "clock", "now"], "homepage": "https://github.com/php-fig/clock", "license": "MIT", "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "require": { "php": "^7.0 || ^8.0" }, "autoload": { "psr-4": { "Psr\\Clock\\": "src/" } } } clock-1.0.0/src/000077500000000000000000000000001434015135200133705ustar00rootroot00000000000000clock-1.0.0/src/ClockInterface.php000066400000000000000000000003161434015135200167550ustar00rootroot00000000000000