FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ApiVersion.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2023 Samuel Dushimimana <dushsam100@gmail.com>
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
11 namespace Fossology\UI\Api\Models;
12 
13 use Psr\Http\Message\ServerRequestInterface;
14 
20 {
21  const V1 = 1;
22  const V2 = 2;
23  const ATTRIBUTE_NAME = 'apiVersion';
24 
29  public static function getVersion(ServerRequestInterface $request): int
30  {
31  return $request->getAttribute(self::ATTRIBUTE_NAME, self::V1);
32  }
33 }
static getVersion(ServerRequestInterface $request)
Definition: ApiVersion.php:29