function setPunchID($id) { $id = trim($id); if ($id == '' or empty($id)) { $id = NULL; } $plf = new PunchListFactory(); if ($id == NULL or $this->Validator->isResultSetWithRows('punch', $plf->getByID($id), TTi18n::gettext('Invalid Punch ID'))) { $this->data['punch_id'] = $id; return TRUE; } return FALSE; }