/** * Sets the value of this field from the posted form. * @param array $post The $_POST array holding the values for this form. */ public function setFromPost($post) { if (is_array($post)) { if (array_key_exists('year', $post)) { $this->setValue(I2CE_Date::getYear($post['year'])); return; } } else { if (is_string($post)) { $this->setFromDB($post); return; } } $this->value = I2CE_Date::getYear(); }