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 | * @access public |
||
36 | * @param array $structure structure definition. |
||
37 | */ |
||
38 | public function __construct(array $structure) |
||
42 | |||
43 | /** |
||
44 | * fromPg |
||
45 | * |
||
46 | * @see ConverterInterface |
||
47 | */ |
||
48 | public function fromPg($data, $type, Session $session) |
||
58 | |||
59 | /** |
||
60 | * toPg |
||
61 | * |
||
62 | * @see ConverterInterface |
||
63 | */ |
||
64 | public function toPg($data, $type, Session $session) |
||
78 | |||
79 | /** |
||
80 | * toPgStandardFormat |
||
81 | * |
||
82 | * @see ConverterInterface |
||
83 | */ |
||
84 | public function toPgStandardFormat($data, $type, Session $session) |
||
108 | |||
109 | /** |
||
110 | * convertArray |
||
111 | * |
||
112 | * Convert the given array of values. |
||
113 | * |
||
114 | * @access private |
||
115 | * @param array $data |
||
116 | * @param Session $session |
||
117 | * @param string $method |
||
118 | * @return array |
||
119 | */ |
||
120 | private function convertArray(array $data, Session $session, $method) |
||
135 | } |
||
136 |