/** * Generic method for creating new ticket (without setting creator). * * @param kyDepartment $department Department where new ticket will be created. * @param string $contents Contents of the first post. * @param string $subject Subject of new ticket. * @return kyTicket */ private static function createNewGeneric($department, $contents, $subject) { $new_ticket = new kyTicket(); $new_ticket->setStatusId(self::$default_status_id); $new_ticket->setPriorityId(self::$default_priority_id); $new_ticket->setTypeId(self::$default_type_id); $new_ticket->setDepartment($department); $new_ticket->setSubject($subject); $new_ticket->setContents($contents); return $new_ticket; }