1 | <?php |
||
9 | class Map extends Model_Base { |
||
10 | |||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $_center; |
||
15 | |||
16 | /** |
||
17 | * The Map element height (default: 400px). |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $_height = '400px'; |
||
21 | |||
22 | /** |
||
23 | * The string to use for the map HTML element id property |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $_html_id; |
||
28 | |||
29 | /** |
||
30 | * @var Marker[] |
||
31 | */ |
||
32 | protected $_markers = array(); |
||
33 | |||
34 | /** |
||
35 | * The Map element width (default: 100%). |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $_width = '100%'; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $_zoom = 5; |
||
44 | |||
45 | /** |
||
46 | * @param Marker $marker |
||
47 | */ |
||
48 | 1 | function add_marker( $marker ) { |
|
53 | |||
54 | /** |
||
55 | * @param Marker[] $markers |
||
56 | */ |
||
57 | 1 | function add_markers( $markers ) { |
|
62 | |||
63 | /** |
||
64 | * @return array |
||
65 | */ |
||
66 | 3 | function center() { |
|
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | 2 | function height() { |
|
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | 2 | function html_id() { |
|
93 | |||
94 | /** |
||
95 | * @return Marker[] |
||
96 | */ |
||
97 | 1 | function markers() { |
|
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | 1 | function width() { |
|
111 | |||
112 | /** |
||
113 | * @return int |
||
114 | */ |
||
115 | 3 | function zoom() { |
|
120 | |||
121 | /** |
||
122 | * @param array $center |
||
123 | */ |
||
124 | 1 | function set_center( $center ) { |
|
134 | |||
135 | /** |
||
136 | * @param int $zoom |
||
137 | */ |
||
138 | 1 | function set_zoom( $zoom ) { |
|
143 | |||
144 | /** |
||
145 | * @param string $height |
||
146 | */ |
||
147 | 1 | function set_height( $height ) { |
|
152 | |||
153 | /** |
||
154 | * @param string $id |
||
155 | */ |
||
156 | 1 | function set_html_id( $id ) { |
|
161 | |||
162 | /** |
||
163 | * @return array |
||
164 | * |
||
165 | * @todo Refactor to make_params |
||
166 | */ |
||
167 | 1 | function make_args() { |
|
175 | |||
176 | } |
||
177 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.