1 | <?php |
||
25 | class PgComposite extends ArrayTypeConverter |
||
26 | { |
||
27 | protected $structure; |
||
28 | |||
29 | /** |
||
30 | * __construct |
||
31 | * |
||
32 | * Takes the composite type structure as parameter. |
||
33 | * The structure is $name => $type. |
||
34 | * |
||
35 | * @param array $structure structure definition. |
||
36 | */ |
||
37 | public function __construct(array $structure) |
||
41 | |||
42 | /** |
||
43 | * fromPg |
||
44 | * |
||
45 | * @see ConverterInterface |
||
46 | */ |
||
47 | public function fromPg($data, $type, Session $session) |
||
57 | |||
58 | /** |
||
59 | * toPg |
||
60 | * |
||
61 | * @see ConverterInterface |
||
62 | */ |
||
63 | public function toPg($data, $type, Session $session) |
||
77 | |||
78 | /** |
||
79 | * toPgStandardFormat |
||
80 | * |
||
81 | * @see ConverterInterface |
||
82 | */ |
||
83 | public function toPgStandardFormat($data, $type, Session $session) |
||
107 | |||
108 | /** |
||
109 | * convertArray |
||
110 | * |
||
111 | * Convert the given array of values. |
||
112 | * |
||
113 | * @param array $data |
||
114 | * @param Session $session |
||
115 | * @param string $method |
||
116 | * @return array |
||
117 | */ |
||
118 | private function convertArray(array $data, Session $session, $method) |
||
133 | } |
||
134 |