1 | <?php |
||
36 | class Format |
||
37 | { |
||
38 | /** |
||
39 | * Create a new Skeleton Instance |
||
40 | */ |
||
41 | public function __construct() |
||
45 | |||
46 | /** |
||
47 | * Remove empty fields (null, '' or zero) |
||
48 | * |
||
49 | * @param object|array $collect items |
||
50 | * |
||
51 | * @return mixed |
||
52 | */ |
||
53 | 3 | public function removeEmpty($collect) |
|
65 | |||
66 | /** |
||
67 | * Set RFC3339 format |
||
68 | * |
||
69 | * @param string $date Format yyyy-mm-dd |
||
70 | * @param string $time Format hh:ii:ss |
||
71 | * |
||
72 | * @return null|string |
||
73 | */ |
||
74 | 3 | public function setRfc3339($date = null, $time = null) |
|
86 | |||
87 | /** |
||
88 | * Change snake case to camel case |
||
89 | * |
||
90 | * @param object|array $data Data to convert |
||
91 | * |
||
92 | * @see https://stackoverflow.com/a/3600758 |
||
93 | * |
||
94 | * @return null |
||
95 | */ |
||
96 | 6 | public function convertSnakeToCamel($data) |
|
114 | |||
115 | /** |
||
116 | * Set ISO-6709 standard |
||
117 | * |
||
118 | * @param object $coords Array with lat and lng |
||
119 | * |
||
120 | * @return null |
||
121 | */ |
||
122 | 3 | public function setIso6709($coords) |
|
132 | } |
||
133 |