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


PHP Student::getUsername方法代码示例

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


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

示例1: 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

示例2: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     // Get an application if one exists
     PHPWS_Core::initModClass('hms', 'HMS_RLC_Application.php');
     $application = HMS_RLC_Application::getApplicationByUsername($student->getUsername(), $this->getTerm());
     // Check for an assignment
     PHPWS_Core::initModClass('hms', 'HMS_RLC_Assignment.php');
     $assignment = HMS_RLC_Assignment::getAssignmentByUsername($student->getUsername(), $this->getTerm());
     PHPWS_Core::initModClass('hms', 'RlcApplicationMenuView.php');
     return new RlcApplicationMenuView($this->term, $student, $this->getStartDate(), $this->getEditDate(), $this->getEndDate(), $application, $assignment);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:11,代码来源:RlcApplication.php

示例3: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'HMS_Assignment.php');
     PHPWS_Core::initModClass('hms', 'HMS_Lottery.php');
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     PHPWS_Core::initModClass('hms', 'ReapplicationMenuBlockView.php');
     $assignment = HMS_Assignment::getAssignment($student->getUsername(), $this->term);
     $application = HousingApplication::getApplicationByUser($student->getUsername(), $this->term);
     if (!$application instanceof LotteryApplication) {
         $application = null;
     }
     $roommateRequests = HMS_Lottery::get_lottery_roommate_invites($student->getUsername(), $this->term);
     return new ReapplicationMenuBlockView($this->term, $this->getStartDate(), $this->getEndDate(), $assignment, $application, $roommateRequests);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:14,代码来源:Reapplication.php

示例4: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     PHPWS_Core::initModClass('hms', 'ApplicationMenuBlockView.php');
     $application = HousingApplication::getApplicationByUser($student->getUsername(), $this->term);
     return new ApplicationMenuBlockView($this->term, $this->getStartDate(), $this->getEditDate(), $this->getEndDate(), $application);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:7,代码来源:Application.php

示例5: showForStudent

 public function showForStudent(Student $student, $term)
 {
     // for freshmen
     if ($student->getApplicationTerm() > Term::getCurrentTerm()) {
         return false;
     }
     PHPWS_Core::initModClass('hms', 'HMS_Assignment.php');
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     $application = HousingApplication::checkForApplication($student->getUsername(), $term);
     $assignment = HMS_Assignment::checkForAssignment($student->getUsername(), $term);
     // for returning students (summer terms)
     if ($term > $student->getApplicationTerm() && $assignment !== TRUE && $application !== FALSE) {
         return true;
     }
     return false;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:16,代码来源:ReappWaitingList.php

示例6: 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

示例7: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     PHPWS_Core::initModClass('hms', 'RlcReapplicationMenuBlockView.php');
     PHPWS_Core::initModClass('hms', 'HMS_RLC_Application.php');
     PHPWS_Core::initModClass('hms', 'HMS_RLC_Assignment.php');
     $application = HousingApplication::getApplicationByUser($student->getUsername(), $this->term);
     if (!$application instanceof LotteryApplication) {
         $application = null;
     }
     $rlcApp = HMS_RLC_Application::getApplicationByUsername($student->getUsername(), $this->term);
     if (!$rlcApp instanceof HMS_RLC_Application) {
         $rlcApp = null;
     }
     // Check for an assignment
     $assignment = HMS_RLC_Assignment::getAssignmentByUsername($student->getUsername(), $this->getTerm());
     return new RlcReapplicationMenuBlockView($this->term, $this->getStartDate(), $this->getEndDate(), $application, $rlcApp, $assignment);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:18,代码来源:RlcReapplication.php

示例8: getApplication

 public static function getApplication(Student $student, $term)
 {
     $db = PdoFactory::getPdoInstance();
     $query = "SELECT * FROM hms_learning_community_applications where username = :username and term = :term";
     $stmt = $db->prepare($query);
     $stmt->execute(array('username' => $student->getUsername(), 'term' => $term));
     $stmt->setFetchMode(PDO::FETCH_CLASS, 'RlcApplicationRestored');
     return $stmt->fetch();
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:RlcApplicationFactory.php

示例9: getMembership

 public static function getMembership(Student $student, $term)
 {
     $db = PdoFactory::getPdoInstance();
     $query = "select hms_learning_community_assignment.* from hms_learning_community_assignment JOIN hms_learning_community_applications ON hms_learning_community_assignment.application_id = hms_learning_community_applications.id where term = :term and username = :username;";
     $stmt = $db->prepare($query);
     $stmt->execute(array('username' => $student->getUsername(), 'term' => $term));
     $stmt->setFetchMode(PDO::FETCH_CLASS, 'RlcMembershipRestored');
     return $stmt->fetch();
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:RlcMembershipFactory.php

示例10: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'RoomChangeMenuBlockView.php');
     PHPWS_Core::initModClass('hms', 'HMS_Assignment.php');
     PHPWS_Core::initModClass('hms', 'RoomChangeRequestFactory.php');
     $assignment = HMS_Assignment::getAssignment($student->getUsername(), $this->term);
     $request = RoomChangeRequestFactory::getPendingByStudent($student, $this->term);
     return new RoomChangeMenuBlockView($student, $this->term, $this->getStartDate(), $this->getEndDate(), $assignment, $request);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:RoomChange.php

示例11: __construct

 public function __construct($id = null, $type = null, Student $student = null, $term = null, HMS_Residence_Hall $hall = null, HMS_Bed $bed = null, $mealPlan = null, $mealCode = null, $percentRefund = null)
 {
     if (!is_null($id) && $id != 0) {
         $this->load();
         return;
     }
     if (is_null($type)) {
         return;
     }
     $this->type = $type;
     $this->asu_username = strtolower($student->getUsername());
     $this->term = $term;
     $this->building_code = $hall->getBannerBuildingCode();
     $this->bed_code = $bed->getBannerId();
     $this->meal_plan = $mealPlan;
     $this->meal_code = $mealCode;
     $this->percent_refund = $percentRefund;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:18,代码来源:BannerQueueItem.php

示例12: refreshCache

 private function refreshCache(Student $student, $term)
 {
     // Store the core data
     $db = new PHPWS_DB('hms_student_cache');
     $db->addWhere('username', $student->getUsername());
     $db->addWhere('banner_id', $student->getBannerId());
     $db->addWhere('term', $term);
     $result = $db->delete();
     // Silently log any errors
     PHPWS_Error::logIfError($result);
     $db->reset();
     $student = CachedStudent::toCachedStudent($student);
     $student->save($term);
     // Silently log any errors
     PHPWS_Error::logIfError($result);
     // Store the addresses
     self::setAddresses($student);
     // Store the phone numbers
     self::setPhoneNumbers($student);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:20,代码来源:LocalCacheDataProvider.php

示例13: queueRemoveAssignment

 /**
  * Queues a Remove Assignment
  *
  * NOTE: If the queue contains a Create Assignment for the same
  * user to the same room, this will NOT queue a room assignment,
  * but rather will delete the original assignment, UNLESS the
  * $force_queue flag is set.  The $force_queue flag being true will
  * queue a removal no matter what.
  *
  * MORE NOTE: If this requires immediate processing because banner
  * commits are enabled, the it will be sent straight to Banner,
  * and so the force_queue flag will be ignored.
  */
 public static function queueRemoveAssignment(Student $student, $term, HMS_Residence_Hall $hall, HMS_Bed $bed, $refund)
 {
     $entry = new BannerQueueItem(0, BANNER_QUEUE_REMOVAL, $student, $term, $hall, $bed, null, null, $refund);
     if (BannerQueue::processImmediately($term)) {
         return $entry->process();
     }
     // Otherwise, look for an corresponding assignment
     $db = new PHPWS_DB('hms_banner_queue');
     $db->addWhere('type', BANNER_QUEUE_ASSIGNMENT);
     $db->addWhere('asu_username', $student->getUsername());
     $db->addWhere('building_code', $hall->getBannerBuildingCode());
     $db->addWhere('bed_code', $bed->getBannerId());
     $db->addWhere('term', $term);
     $result = $db->count();
     if (PHPWS_Error::logIfError($result)) {
         throw new DatabaseException($result->toString());
     }
     if ($result == 0) {
         return $entry->save();
     } else {
         return $db->delete();
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:36,代码来源:BannerQueue.php

示例14: 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

示例15: sendCheckoutConfirmation

 public static function sendCheckoutConfirmation(Student $student, InfoCard $infoCard)
 {
     $tags = array();
     $tags['NAME'] = $student->getName();
     $tags['ASSIGNMENT'] = $infoCard->getRoom()->where_am_i();
     $content = PHPWS_Template::process($tags, 'hms', 'email/checkoutConfirmation.tpl');
     $htmlContent = Markdown::defaultTransform($content);
     $message = Swift_Message::newInstance();
     $message->setSubject('Check-out Confirmation');
     $message->setFrom(array(FROM_ADDRESS => SYSTEM_NAME));
     $message->setTo(array($student->getUsername() . TO_DOMAIN => $student->getName()));
     $message->setBody($content);
     $message->addPart($htmlContent, 'text/html');
     // Attach info card
     //$attachment = Swift_Attachment::newInstance($infoCardView->getPdf()->output('my-pdf-file.pdf', 'S'), 'ResidentInfoCard.pdf', 'application/pdf');
     //$message->attach($attachment);
     if (EMAIL_TEST_FLAG) {
         self::logSwiftmailMessageLong($message);
         return;
     }
     $transport = Swift_SmtpTransport::newInstance('localhost');
     $mailer = Swift_Mailer::newInstance($transport);
     $mailer->send($message);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:24,代码来源:HMS_Email.php


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