data)) { return NULL; } return $this->data[$key]; } /** * This function determines whether the argument is a valid id. * A valid id is a string containing lowercase alphanumeric * characters. * * @param $id The id we should validate. * @return TRUE if the id is valid, FALSE otherwise. */ private static function isValidID($id) { if(!is_string($id)) { return FALSE; } if(strlen($id) < 1) { return FALSE; } if(preg_match('/[^0-9a-z]/', $id)) { return FALSE; } return TRUE; } }