Skip to content

Commit 272bec6

Browse files
committed
Add main configuration class to hold all other config objects.
1 parent 344a1ac commit 272bec6

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

src/Config.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Pdsinterop\Solid\Auth;
4+
5+
use Pdsinterop\Solid\Auth\Config\Client;
6+
use Pdsinterop\Solid\Auth\Config\Expiration;
7+
use Pdsinterop\Solid\Auth\Config\Keys;
8+
use Pdsinterop\Solid\Auth\Config\Server;
9+
10+
class Config
11+
{
12+
////////////////////////////// CLASS PROPERTIES \\\\\\\\\\\\\\\\\\\\\\\\\\\\
13+
14+
/** @var Client */
15+
private $client;
16+
/** @var Expiration */
17+
private $expiration;
18+
/** @var array */
19+
private $grantTypes;
20+
/**@var Keys */
21+
private $keys;
22+
/** @var Server */
23+
private $server;
24+
25+
//////////////////////////// GETTERS AND SETTERS \\\\\\\\\\\\\\\\\\\\\\\\\\\
26+
27+
/** @return Client */
28+
public function getClient() : Client
29+
{
30+
return $this->client;
31+
}
32+
33+
public function getExpiration() : Expiration
34+
{
35+
return $this->expiration;
36+
}
37+
38+
public function getGrantTypes() : array
39+
{
40+
return $this->grantTypes;
41+
}
42+
43+
public function getKeys() : Keys
44+
{
45+
return $this->keys;
46+
}
47+
48+
public function getServer() : Server
49+
{
50+
return $this->server;
51+
}
52+
53+
54+
//////////////////////////////// PUBLIC API \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
55+
56+
final public function __construct(Client $client, Expiration $expiration, array $grantTypes, Keys $keys, Server $server)
57+
{
58+
$this->client = $client;
59+
$this->expiration = $expiration;
60+
$this->grantTypes = $grantTypes;
61+
$this->keys = $keys;
62+
$this->server = $server;
63+
}
64+
}

0 commit comments

Comments
 (0)