1 | <?php |
||
22 | abstract class AbstractTable extends Table |
||
23 | { |
||
24 | /** |
||
25 | * Types |
||
26 | */ |
||
27 | public const TYPE_ACCESS = 'access'; |
||
28 | public const TYPE_REQUEST = 'request'; |
||
29 | |||
30 | /** |
||
31 | * Providers |
||
32 | * - equals - login + password |
||
33 | * - token - token with ttl |
||
34 | * - cookie - cookie token with ttl |
||
35 | */ |
||
36 | public const PROVIDER_COOKIE = 'cookie'; |
||
37 | public const PROVIDER_EQUALS = 'equals'; |
||
38 | public const PROVIDER_FACEBOOK = 'facebook'; |
||
39 | public const PROVIDER_GOOGLE = 'google'; |
||
40 | public const PROVIDER_LDAP = 'ldap'; |
||
41 | public const PROVIDER_TOKEN = 'token'; |
||
42 | public const PROVIDER_TWITTER = 'twitter'; |
||
43 | |||
44 | /** |
||
45 | * @var string Table |
||
46 | */ |
||
47 | protected $name = 'auth'; |
||
48 | |||
49 | /** |
||
50 | * @var array Primary key(s) |
||
51 | */ |
||
52 | protected $primary = ['provider', 'foreignKey']; |
||
53 | |||
54 | /** |
||
55 | * Get AuthRow |
||
56 | * |
||
57 | * @param string $provider |
||
58 | * @param string $foreignKey |
||
59 | * |
||
60 | * @return RowInterface |
||
61 | * @throws \InvalidArgumentException |
||
62 | * @throws \Bluz\Db\Exception\DbException |
||
63 | * @throws \Bluz\Db\Exception\InvalidPrimaryKeyException |
||
64 | */ |
||
65 | 1 | public static function getAuthRow($provider, $foreignKey) : ?RowInterface |
|
69 | } |
||
70 |