1 | <?php |
||
33 | class Birthday extends DateTime |
||
34 | { |
||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $hasDate = false; |
||
39 | |||
40 | /** |
||
41 | * @var bool |
||
42 | */ |
||
43 | private $hasYear = false; |
||
44 | |||
45 | /** |
||
46 | * Parses Graph birthday format to set indication flags, possible values: |
||
47 | * |
||
48 | * MM/DD/YYYY |
||
49 | * MM/DD |
||
50 | * YYYY |
||
51 | * |
||
52 | * @link https://developers.facebook.com/docs/graph-api/reference/user |
||
53 | * |
||
54 | * @param string $date |
||
55 | */ |
||
56 | public function __construct($date) |
||
65 | |||
66 | /** |
||
67 | * Returns whether date object contains birth day and month |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function hasDate() |
||
75 | |||
76 | /** |
||
77 | * Returns whether date object contains birth year |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasYear() |
||
85 | } |
||
86 |