1 | <?php |
||
7 | class AncestryField extends FormField |
||
|
|||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @var nameField |
||
12 | */ |
||
13 | //level 1 |
||
14 | protected static $array_of_ancestors = array( |
||
15 | "mField" => "Mother", |
||
16 | "fField" => "Father", |
||
17 | //level 2 |
||
18 | "mmField" => "Mother's Mother", |
||
19 | "mfField" => "Mother's Father", |
||
20 | "fmField" => "Father's Mother", |
||
21 | "ffField" => "Father's Father", |
||
22 | //level 3 |
||
23 | "mmmField" => "Mother's Mother's Mother", |
||
24 | "mmfField" => "Mother's Mother's Father", |
||
25 | "mfmField" => "Mother's Father's Mother", |
||
26 | "mffField" => "Mother's Father's Father", |
||
27 | "fmmField" => "Father's Mother's Mother", |
||
28 | "fmfField" => "Father's Mother's Father", |
||
29 | "ffmField" => "Father's Father's Mother", |
||
30 | "fffField" => "Father's Father's Father", |
||
31 | //level 4 |
||
32 | "mmmmField" => "Mother's Mother's Mother's Mother", |
||
33 | "mmmfField" => "Mother's Mother's Mother's Father", |
||
34 | "mmfmField" => "Mother's Mother's Father's Mother", |
||
35 | "mmffField" => "Mother's Mother's Father's Father", |
||
36 | "mfmmField" => "Mother's Father's Mother's Mother", |
||
37 | "mfmfField" => "Mother's Father's Mother's Father", |
||
38 | "mffmField" => "Mother's Father's Father's Mother", |
||
39 | "mfffField" => "Mother's Father's Father's Father", |
||
40 | "fmmmField" => "Father's Mother's Mother's Mother", |
||
41 | "fmmfField" => "Father's Mother's Mother's Father", |
||
42 | "fmfmField" => "Father's Mother's Father's Mother", |
||
43 | "fmffField" => "Father's Mother's Father's Father", |
||
44 | "ffmmField" => "Father's Father's Mother's Mother", |
||
45 | "ffmfField" => "Father's Father's Mother's Father", |
||
46 | "fffmField" => "Father's Father's Father's Mother", |
||
47 | "ffffField" => "Father's Father's Father's Father" |
||
48 | ); |
||
49 | public static function get_array_of_ancestors() |
||
57 | |||
58 | protected $fieldHolder = array(); |
||
59 | |||
60 | public function __construct($name, $title = null, $value = "") |
||
67 | |||
68 | public function setForm($form) |
||
75 | |||
76 | public function Field() |
||
89 | |||
90 | /** |
||
91 | */ |
||
92 | public function setValue($val) |
||
116 | |||
117 | public function dataValue() |
||
125 | |||
126 | public function Icon() |
||
130 | } |
||
131 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.