1 | <?php |
||
2 | |||
3 | /* |
||
4 | * @copyright 2014 Mautic Contributors. All rights reserved |
||
5 | * @author Mautic |
||
6 | * |
||
7 | * @link http://mautic.org |
||
8 | * |
||
9 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||
10 | */ |
||
11 | |||
12 | namespace Mautic\ApiBundle\Entity\oAuth1; |
||
13 | |||
14 | use Doctrine\ORM\Mapping as ORM; |
||
15 | use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder; |
||
16 | |||
17 | /** |
||
18 | * Class Nonce. |
||
19 | */ |
||
20 | class Nonce |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $nonce; |
||
26 | |||
27 | /** @var string */ |
||
28 | private $timestamp; |
||
29 | |||
30 | /** |
||
31 | * @param $nonce |
||
32 | * @param $timestamp |
||
33 | */ |
||
34 | public function __construct($nonce, $timestamp) |
||
35 | { |
||
36 | $this->nonce = $nonce; |
||
37 | $this->timestamp = $timestamp; |
||
38 | } |
||
39 | |||
40 | public static function loadMetadata(ORM\ClassMetadata $metadata) |
||
41 | { |
||
42 | $builder = new ClassMetadataBuilder($metadata); |
||
43 | |||
44 | $builder->setTable('oauth1_nonces') |
||
45 | ->setCustomRepositoryClass('Mautic\ApiBundle\Entity\oAuth1\NonceRepository'); |
||
46 | |||
47 | $builder->createField('nonce', 'string') |
||
0 ignored issues
–
show
|
|||
48 | ->isPrimaryKey() |
||
49 | ->build(); |
||
50 | |||
51 | $builder->addField('timestamp', 'string'); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return mixed |
||
56 | */ |
||
57 | public function getNonce() |
||
58 | { |
||
59 | return $this->nonce; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function getTimestamp() |
||
66 | { |
||
67 | return $this->timestamp; |
||
68 | } |
||
69 | } |
||
70 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.