1 | <?php |
||
15 | abstract class BaseDateTime extends \DateTime |
||
16 | { |
||
17 | protected static $enDigit = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); |
||
18 | |||
19 | protected static $bnDigit = array('০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'); |
||
20 | |||
21 | protected static $enArray = array( |
||
22 | 'l' => array('Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'), |
||
23 | 'D' => array('Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri'), |
||
24 | 'F' => array('January','February','March','April','May','June','July','August','September','October','November','December'), |
||
25 | 'M' => array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') |
||
26 | ); |
||
27 | |||
28 | protected static $bnArray = array( |
||
29 | 'l' => array('শনিবার', 'রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহঃস্পতিবার', 'শুক্রবার'), |
||
30 | 'D' => array('শনি', 'রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহ', 'শুক্র'), |
||
31 | 'F' => array('জানুয়ারী','ফেব্রুয়ারি','মার্চ','এপ্রিল','মে','জুন','জুলাই','আগস্ট','সেপ্টেম্বর','অক্টোবর','নভেম্বর','ডিসেম্বর'), |
||
32 | 'M' => array('জানু','ফেব্রু','মার্চ','এপ্রিল','মে','জুন','জুলাই','আগস্ট','সেপ্টে','অক্টো','নভে','ডিসে') |
||
33 | ); |
||
34 | |||
35 | protected static $enAmPm = array('am', 'pm'); |
||
36 | |||
37 | protected static $bnAmPM = array('পূর্বাহ্ন', 'অপরাহ্ন'); |
||
38 | protected static $bnSuffix = array('', 'লা', 'রা', 'রা', 'ঠা', 'ই', 'শে'); |
||
39 | protected static $bnPrefix = array('ভোর', 'সকাল', 'দুপুর', 'বিকাল', 'সন্ধ্যা', 'রাত'); |
||
40 | protected static $enTimeSlot = array('Dawn', 'Morning', 'Noon', 'Afternoon', 'Evening', 'Night'); |
||
41 | |||
42 | public function __construct($time = 'now', \DateTimeZone $timezone = null) |
||
46 | |||
47 | protected function translateNumbers($number) |
||
51 | |||
52 | protected function replaceSuffix($format) |
||
56 | |||
57 | protected function _format($format) { |
||
60 | |||
61 | protected function getBnSuffix($date) |
||
73 | |||
74 | protected function replaceTimes($format) |
||
85 | |||
86 | protected function getAmPm() |
||
90 | |||
91 | /** |
||
92 | * @param $format |
||
93 | * @param $items |
||
94 | * @return mixed |
||
95 | */ |
||
96 | protected function getInBengali($format, $items) |
||
108 | |||
109 | protected function replaceMeridian($str) |
||
119 | |||
120 | protected function replaceDays($format) |
||
124 | |||
125 | protected function replaceTimePrefix($str) |
||
129 | |||
130 | protected function getTimePrefix() |
||
134 | |||
135 | protected function getPrefixIndex() |
||
148 | |||
149 | |||
150 | /** |
||
151 | * @param $hour |
||
152 | * @return bool |
||
153 | */ |
||
154 | protected function isDawn($hour) |
||
158 | |||
159 | /** |
||
160 | * @param $hour |
||
161 | * @return bool |
||
162 | */ |
||
163 | protected function isMorning($hour) |
||
167 | |||
168 | /** |
||
169 | * @param $hour |
||
170 | * @return bool |
||
171 | */ |
||
172 | protected function isNoon($hour) |
||
176 | |||
177 | /** |
||
178 | * @param $hour |
||
179 | * @return bool |
||
180 | */ |
||
181 | protected function isAfternoon($hour) |
||
185 | |||
186 | /** |
||
187 | * @param $hour |
||
188 | * @return bool |
||
189 | */ |
||
190 | protected function isEvening($hour) |
||
194 | |||
195 | /** |
||
196 | * @param $slot |
||
197 | * @param $hour |
||
198 | * @return mixed |
||
199 | */ |
||
200 | protected function isInTimeSlot($slot, $hour) |
||
204 | } |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.