1 | <?php |
||
13 | class Google_Maps extends \WPLib_Module_Base { |
||
14 | |||
15 | const INSTANCE_CLASS = 'Clubdeuce\WPLib\Components\GoogleMaps\Map'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected static $_version = '0.1.6'; |
||
21 | |||
22 | /** |
||
23 | * |
||
24 | */ |
||
25 | 1 | static function on_load() { |
|
32 | |||
33 | /** |
||
34 | * @param array $args |
||
35 | * @return Map |
||
36 | */ |
||
37 | 1 | static function make_new_map( $args = array() ) { |
|
43 | |||
44 | /** |
||
45 | * @param $address |
||
46 | * @param array $args |
||
47 | * |
||
48 | * @return Marker |
||
49 | */ |
||
50 | 1 | static function make_marker_by_address( $address, $args = array() ) { |
|
56 | |||
57 | /** |
||
58 | * @param float $lat |
||
59 | * @param float $lng |
||
60 | * @param array $args |
||
61 | * |
||
62 | * @return Marker |
||
63 | */ |
||
64 | 1 | static function make_marker_by_position( $lat, $lng, $args = array() ) { |
|
70 | } |
||
71 | |||
73 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.