-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVersion.php
63 lines (59 loc) · 1.52 KB
/
Version.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* Project database
* Created by PhpStorm
* User: 713uk13m <[email protected]>
* Copyright: 713uk13m <[email protected]>
* Date: 09/22/2021
* Time: 02:59
*/
namespace nguyenanhung\MyDatabase;
/**
* Trait Version
*
* @package nguyenanhung\MyDatabase
* @author 713uk13m <[email protected]>
* @copyright 713uk13m <[email protected]>
*/
trait Version
{
/**
* Function getVersion
*
* @return string
* @author : 713uk13m <[email protected]>
* @copyright: 713uk13m <[email protected]>
* @time : 08/29/2021 04:53
*/
public function getVersion(): string
{
return self::VERSION;
}
/**
* Function getSDKPropertiesInfo
*
* @param bool $json
*
* @return array|false|string
* @author : 713uk13m <[email protected]>
* @copyright: 713uk13m <[email protected]>
* @time : 09/22/2021 04:23
*/
public function getSDKPropertiesInfo(bool $json = false)
{
$properties = array(
'name' => self::PROJECT_NAME,
'version' => self::VERSION,
'last_modified' => self::LAST_MODIFIED,
'author_name' => self::AUTHOR_NAME,
'author_email' => self::AUTHOR_EMAIL,
'author_url' => self::AUTHOR_URL,
'github_url' => self::GITHUB_URL,
'packages_url' => self::PACKAGES_URL
);
if ($json === true) {
return json_encode($properties);
}
return $properties;
}
}