当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::getBannerId方法代码示例

本文整理汇总了PHP中Student::getBannerId方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::getBannerId方法的具体用法?PHP Student::getBannerId怎么用?PHP Student::getBannerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::getBannerId方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(Student $student, RoomDamage $damage)
 {
     $this->banner_id = $student->getBannerId();
     $this->damage_id = $damage->getId();
     $this->state = 'new';
     $this->amount = null;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:7,代码来源:RoomDamageResponsibility.php

示例2: __construct

 /**
  * Create a new RoomChangeParticipant
  *
  * @param RoomChangeRequest $request
  * @param Student $student
  * @param HMS_Bed $fromBed
  */
 public function __construct(RoomChangeRequest $request, Student $student, HMS_Bed $fromBed)
 {
     $this->id = 0;
     $this->request_id = $request->getId();
     $this->banner_id = $student->getBannerId();
     $this->from_bed = $fromBed->getId();
     // Set initial state
     $this->setState(new ParticipantStateNew($this, time(), null, UserStatus::getUsername()));
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:16,代码来源:RoomChangeParticipant.php

示例3: populateSharedFields

 private function populateSharedFields($term, Student $student)
 {
     $this->app->setTerm($term);
     $this->app->setBannerId($student->getBannerId());
     $this->app->setUsername($student->getUsername());
     $this->app->setGender($student->getGender());
     $this->app->setStudentType($student->getType());
     $this->app->setApplicationTerm($student->getApplicationTerm());
     $doNotCall = $this->context->get('do_not_call');
     $areaCode = $this->context->get('area_code');
     $exchange = $this->context->get('exchange');
     $number = $this->context->get('number');
     /* Phone Number */
     /*
     if(is_null($doNotCall)){
         //test('ohh hai',1);
         // do not call checkbox was not selected, so check the number
         if(is_null($areaCode) || is_null($exchange) || is_null($number)){
             throw new InvalidArgumentException('Please provide a cell-phone number or click the checkbox stating that you do not wish to share your number with us.');
         }
     }
     */
     if (is_null($doNotCall)) {
         $this->app->setCellPhone($areaCode . $exchange . $number);
     } else {
         $this->app->setCellPhone(null);
     }
     /* Meal Plan */
     $mealOption = $this->context->get('meal_option');
     if (!isset($mealOption)) {
         //throw new InvalidArgumentException('Missing meal option from context.');
     }
     $this->app->setMealPlan($mealOption);
     /* Emergency Contact */
     $this->app->setEmergencyContactName($this->context->get('emergency_contact_name'));
     $this->app->setEmergencyContactRelationship($this->context->get('emergency_contact_relationship'));
     $this->app->setEmergencyContactPhone($this->context->get('emergency_contact_phone'));
     $this->app->setEmergencyContactEmail($this->context->get('emergency_contact_email'));
     /* Missing Persons */
     $this->app->setMissingPersonName($this->context->get('missing_person_name'));
     $this->app->setMissingPersonRelationship($this->context->get('missing_person_relationship'));
     $this->app->setMissingPersonPhone($this->context->get('missing_person_phone'));
     $this->app->setMissingPersonEmail($this->context->get('missing_person_email'));
     /* Medical Conditions */
     $this->app->setEmergencyMedicalCondition($this->context->get('emergency_medical_condition'));
     /* Special Needs */
     $specialNeeds = $this->context->get('special_needs');
     isset($specialNeeds['physical_disability']) ? $this->app->setPhysicalDisability(true) : null;
     isset($specialNeeds['psych_disability']) ? $this->app->setPsychDisability(true) : null;
     isset($specialNeeds['gender_need']) ? $this->app->setGenderNeed(true) : null;
     isset($specialNeeds['medical_need']) ? $this->app->setMedicalNeed(true) : null;
     if ($student->isInternational()) {
         $this->app->setInternational(true);
     } else {
         $this->app->setInternational(false);
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:57,代码来源:ContextApplicationFactory.php

示例4: getParticipantByRequestStudent

 public static function getParticipantByRequestStudent(RoomChangeRequest $request, Student $student)
 {
     $db = PdoFactory::getPdoInstance();
     $query = "SELECT * FROM hms_room_change_curr_participant WHERE request_id = :request_id and banner_id = :bannerId";
     $stmt = $db->prepare($query);
     $params = array('request_id' => $request->getId(), 'bannerId' => $student->getBannerId());
     $stmt->execute($params);
     $stmt->setFetchMode(PDO::FETCH_CLASS, 'RoomChangeParticipantRestored');
     return $stmt->fetch();
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:10,代码来源:RoomChangeParticipantFactory.php

示例5: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'HMS_RLC_Assignment.php');
     PHPWS_Core::initModClass('hms', 'HMS_Assignment.php');
     PHPWS_Core::initModClass('hms', 'RlcSelfSelectionMenuBlockView.php');
     PHPWS_Core::initModClass('hms', 'HMS_Lottery.php');
     $rlcAssignment = HMS_RLC_Assignment::getAssignmentByUsername($student->getUsername(), $this->getTerm());
     $roomAssignment = HMS_Assignment::getAssignmentByBannerId($student->getBannerId(), $this->getTerm());
     $roommateRequests = HMS_Lottery::get_lottery_roommate_invites($student->getUsername(), $this->term);
     return new RlcSelfSelectionMenuBlockView($this->term, $this->getStartDate(), $this->getEndDate(), $rlcAssignment, $roomAssignment, $roommateRequests);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:11,代码来源:RlcSelfSelection.php

示例6: getContractByStudentTerm

 public static function getContractByStudentTerm(Student $student, $term)
 {
     PHPWS_Core::initModClass('hms', 'Contract.php');
     $db = PdoFactory::getPdoInstance();
     $query = 'SELECT * FROM hms_contract WHERE banner_id = :bannerId AND term = :term';
     $stmt = $db->prepare($query);
     $params = array('bannerId' => $student->getBannerId(), 'term' => $term);
     $stmt->execute($params);
     $stmt->setFetchMode(PDO::FETCH_CLASS, 'ContractRestored');
     return $stmt->fetch();
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:11,代码来源:ContractFactory.php

示例7: __construct

 public function __construct(Student $student, HMS_Bed $bed, $term, $checkinBy, $keyCode)
 {
     $this->setBannerId($student->getBannerId());
     $this->setBedPersistentId($bed->getPersistentId());
     $this->setBedId($bed->getId());
     $this->setTerm($term);
     $this->setRoomId($bed->get_parent()->getId());
     $this->setCheckinDate(time());
     $this->setCheckinby($checkinBy);
     $this->setKeyCode($keyCode);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:11,代码来源:Checkin.php

示例8: refreshCache

 public function refreshCache(Student $student, $term)
 {
     // Double check the TTL... Caching something in APC with a ttl of zero means it will be stored forever
     // HMS takes a TTL of zero to mean "don't cache it at all"
     if ($this->ttl > 0) {
         // Store the actual user object
         $key = $this->makeCacheKey($student->getBannerId(), $term);
         apc_store($key, $student, $this->ttl);
         // Store a secondary key for username->BannerId lookup
         $key = $student->getUsername() . $term;
         apc_store($key, $student->getBannerId(), $this->ttl);
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:13,代码来源:ApcDataProvider.php

示例9: getAppByStudent

 /**
  * Returns the HousingApplication object (of a specific child type) for the given term,
  * or null if no Housing Application exists.
  *
  * Uses BannerIDs to lookup students.
  * Replaces HousingApplication::getApplicationByUser()
  *
  * @param Student $student
  * @param string $term
  * @param string $applicationType
  * @throws DatabaseException
  * @throws InvalidArgumentException
  */
 public static function getAppByStudent(Student $student, $term, $applicationType = NULL)
 {
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     PHPWS_Core::initModClass('hms', 'FallApplication.php');
     PHPWS_Core::initModClass('hms', 'SpringApplication.php');
     PHPWS_Core::initModClass('hms', 'SummerApplication.php');
     PHPWS_Core::initModClass('hms', 'LotteryApplication.php');
     PHPWS_Core::initModClass('hms', 'WaitingListApplication.php');
     $db = new PHPWS_DB('hms_new_application');
     $db->addWhere('banner_id', $student->getBannerId());
     $db->addWhere('term', $term);
     if (!is_null($applicationType)) {
         $db->addWhere('application_type', $applicationType);
     }
     $result = $db->select('row');
     if (PHPWS_Error::logIfError($result)) {
         throw new DatabaseException($result->toString());
     }
     if ($result == null) {
         return null;
     }
     switch ($result['application_type']) {
         case 'fall':
             $app = new FallApplication($result['id']);
             break;
         case 'spring':
             $app = new SpringApplication($result['id']);
             break;
         case 'summer':
             $app = new SummerApplication($result['id']);
             break;
         case 'lottery':
             $app = new LotteryApplication($result['id']);
             break;
         case 'offcampus_waiting_list':
             $app = new WaitingListApplication($result['id']);
             break;
         default:
             throw new InvalidArgumentException('Unknown application type: ' . $result['application_type']);
     }
     return $app;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:55,代码来源:HousingApplicationFactory.php

示例10: getLastCheckoutForStudent

 public static function getLastCheckoutForStudent(Student $student)
 {
     $db = new PHPWS_DB('hms_checkin');
     $db->addWhere('banner_id', $student->getBannerId());
     $db->addWhere('checkout_date', null, '!=');
     $db->addOrder(array('term DESC', 'checkout_date DESC'));
     $result = $db->getObjects('RestoredCheckin');
     if (PHPWS_Error::logIfError($result)) {
         throw new DatabaseException($result->toString());
     }
     if (sizeof($result) <= 0) {
         return array();
     }
     return array_shift($result);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:15,代码来源:CheckinFactory.php

示例11: assignStudent


//.........这里部分代码省略.........
     if ($room->getGender() == COED && !Current_User::allow('hms', 'coed_assignment')) {
         throw new AssignmentException('You do not have permission to make assignments for Co-ed rooms.');
     }
     // Create the floor object
     $floor = $room->get_parent();
     if (!$floor) {
         throw new AssignmentException('Null floor object.');
     }
     // Create the hall object
     $hall = $floor->get_parent();
     if (!$hall) {
         throw new AssignmentException('Null hall object.');
     }
     if ($meal_plan == BANNER_MEAL_NONE) {
         $meal_plan = NULL;
     }
     // Determine which meal plan to use
     // If this is a freshmen student and they've somehow selected none or low, give them standard
     if ($student->getType() == TYPE_FRESHMEN && ($meal_plan == BANNER_MEAL_NONE || $meal_plan == BANNER_MEAL_LOW)) {
         $meal_plan = BANNER_MEAL_STD;
         // If a student is living in a dorm which requires a meal plan and they've selected none, give them low
     } else {
         if ($hall->meal_plan_required == 1 && $meal_plan == BANNER_MEAL_NONE) {
             $meal_plan = BANNER_MEAL_LOW;
         }
     }
     /**
      * ***************************
      * Temporary Assignment HACK *
      * ***************************
      */
     // Check for an assignment in the temp assignment table
     $db = new PHPWS_DB('hms_temp_assignment');
     $db->addWhere('banner_id', $student->getBannerId());
     $result = $db->select();
     if (PHPWS_Error::logIfError($result)) {
         throw new DatabaseException($result->toString());
     }
     if (sizeof($result) > 0) {
         // Queue an unassign for this student
         $soap = SOAP::getInstance(UserStatus::getUsername(), UserStatus::isAdmin() ? SOAP::ADMIN_USER : SOAP::STUDENT_USER);
         try {
             $soap->removeRoomAssignment($student->getBannerId(), $term, 'TMPR', $result[0]['room_number'], 100);
             // Hard-code to 100% refund
         } catch (Exception $e) {
             throw $e;
         }
         $db = new PHPWS_DB('hms_temp_assignment');
         $db->addValue('banner_id', null);
         $db->addWhere('room_number', $result[0]['room_number']);
         $db->update();
         if (PHPWS_Error::logIfError($result)) {
             throw new DatabaseException($result->toString());
         }
         NQ::simple('hms', hms\NotificationView::WARNING, 'Temporary assignment was removed.');
     }
     // Send this off to the queue for assignment in banner
     $banner_success = BannerQueue::queueAssignment($student, $term, $hall, $vacant_bed, 'HOME', $meal_plan);
     if ($banner_success !== TRUE) {
         throw new AssignmentException('Error while adding the assignment to the Banner queue.');
     }
     // Make the assignment in HMS
     $assignment = new HMS_Assignment();
     $assignment->setBannerId($student->getBannerId());
     $assignment->asu_username = $username;
     $assignment->bed_id = $vacant_bed->id;
开发者ID:jlbooker,项目名称:homestead,代码行数:67,代码来源:HMS_Assignment.php

示例12: setPhoneNumbers

 private static function setPhoneNumbers(Student $student)
 {
     $db = new PHPWS_DB('hms_student_phone_cache');
     $db->addWhere('banner_id', $student->getBannerId());
     $result = $db->delete();
     // Silently log any errors
     PHPWS_Error::logIfError($result);
     $db = new PHPWS_DB('hms_student_phone_cache');
     $phoneList = $student->getPhoneNumberList();
     foreach ($phoneList as $number) {
         $db->reset();
         $obj = new stdClass();
         $obj->number = $number;
         $obj->banner_id = $student->getBannerId();
         $result = $db->saveObject($obj);
         PHPWS_Error::logIfError($result);
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:18,代码来源:LocalCacheDataProvider.php

示例13: sendInvite

 private function sendInvite(Student $student)
 {
     $this->output[] = "Inviting {$student->getUsername()} ({$student->getBannerId()})";
     // Update the winning student's invite
     try {
         $entry = HousingApplicationFactory::getAppByStudent($student, $this->term, 'lottery');
         $entry->invited_on = $this->now;
         $entry->save();
     } catch (Exception $e) {
         $this->output[] = 'Error while trying to select a winning student. Exception: ' . $e->getMessage();
         return;
     }
     // Update the total count
     $this->numInvitesSent['TOTAL']++;
     // Send the notification email
     HMS_Email::send_lottery_invite($student->getUsername(), $student->getName(), $this->academicYear);
     // Log that the invite was sent
     HMS_Activity_Log::log_activity($student->getUsername(), ACTIVITY_LOTTERY_INVITED, UserStatus::getUsername(), "Expires on " . date('m/d/Y h:i:s a', $this->expireTime));
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:19,代码来源:LotteryProcess.php

示例14: getRequestPendingCheckout

 public static function getRequestPendingCheckout(Student $student, $term)
 {
     $db = PdoFactory::getPdoInstance();
     $query = "SELECT hms_room_change_curr_request.* FROM hms_room_change_curr_request\n                    JOIN hms_room_change_curr_participant ON hms_room_change_curr_request.id = hms_room_change_curr_participant.request_id\n                    WHERE\n                        term = :term AND\n                        banner_id = :bannerId AND\n                        hms_room_change_curr_request.state_name = 'Approved' AND\n                        hms_room_change_curr_participant.state_name = 'InProcess'";
     $stmt = $db->prepare($query);
     $stmt->execute(array('term' => $term, 'bannerId' => $student->getBannerId()));
     $results = $stmt->fetchAll(PDO::FETCH_CLASS, 'RoomChangeRequestRestored');
     // If more than one pending request is found, throw an exception
     if (sizeof($results) > 1) {
         throw new InvalidArgumentException('More than one pending room change detected.');
     } else {
         if (sizeof($results) == 0) {
             return null;
         } else {
             return $results[0];
         }
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:18,代码来源:RoomChangeRequestFactory.php


注:本文中的Student::getBannerId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。