1 | <?php |
||
10 | class TwitterType extends Type |
||
11 | { |
||
12 | const TWITTER = 'twitter'; |
||
13 | |||
14 | /** |
||
15 | * @var TwitterJsonSerializer |
||
16 | */ |
||
17 | private $twitterSerializer; |
||
18 | |||
19 | /** |
||
20 | * Sets the serializer |
||
21 | * |
||
22 | * @param TwitterJsonSerializer $twitterSerializer |
||
23 | */ |
||
24 | public function setSerializer(TwitterJsonSerializer $twitterSerializer) |
||
28 | 3 | ||
29 | /** |
||
30 | * Gets the SQL declaration snippet for a field of this type. |
||
31 | * |
||
32 | * @param array $fieldDeclaration The field declaration. |
||
33 | * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) |
||
41 | |||
42 | /** |
||
43 | * Gets the name of this type. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getName() |
||
51 | |||
52 | /** |
||
53 | * @param string $value |
||
54 | * @param AbstractPlatform $platform |
||
55 | * @return TwitterSerializable |
||
56 | */ |
||
57 | public function convertToPHPValue($value, AbstractPlatform $platform) |
||
61 | |||
62 | /** |
||
63 | * @param TwitterSerializable $value |
||
64 | * @param AbstractPlatform $platform |
||
65 | * @return string |
||
66 | */ |
||
67 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
||
75 | |||
76 | /** |
||
77 | * @return TwitterJsonSerializer |
||
78 | */ |
||
79 | private function getSerializer() |
||
83 | } |
||
84 |