當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Shell::wrap方法代碼示例

本文整理匯總了PHP中Shell::wrap方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shell::wrap方法的具體用法?PHP Shell::wrap怎麽用?PHP Shell::wrap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Shell的用法示例。


在下文中一共展示了Shell::wrap方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wrap

 /**
  * @param  $mapping
  * @return Status
  */
 public function wrap($mapping, $prefix = '')
 {
     $result = parent::wrap(array('submitId', 'taskId', 'userId', 'langId', 'timestamp', 'time', 'result', 'task', 'nickname', 'info', 'studyplace', 'city', 'division', 'tatarstan'), 'status', $mapping, $prefix);
     switch ($this->result) {
         case '0':
             $this->result = 'OK';
             break;
         case '255':
             $this->result = 'FL';
             break;
         case '21':
             $this->result = 'CE';
             break;
     }
     if ($this->result % 100 == 1) {
         $this->result = 'WA' . (int) ($this->result / 100);
     } elseif ($this->result % 100 == 2) {
         $this->result = 'PE' . (int) ($this->result / 100);
     } elseif ($this->result % 100 == 3) {
         $this->result = 'TL' . (int) ($this->result / 100);
     } elseif ($this->result % 100 == 4) {
         $this->result = 'RE' . (int) ($this->result / 100);
     } elseif ($this->result % 100 == 20) {
         $this->result = 'ML' . (int) ($this->result / 100);
     } elseif ($this->result % 100 == 23) {
         $this->result = 'DL' . (int) ($this->result / 100);
     }
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:33,代碼來源:Status.php

示例2: wrap

 /**
  * @param  $mapping
  * @return Team
  */
 public function wrap($mapping)
 {
     $result = parent::wrap(array('id', 'name', 'education', 'city'), 'team', $mapping);
     $this->setContestantA(Butler::getORMManager()->createMember()->wrap($mapping, 'teamcontestanta'));
     $this->setContestantB(Butler::getORMManager()->createMember()->wrap($mapping, 'teamcontestantb'));
     $this->setContestantC(Butler::getORMManager()->createMember()->wrap($mapping, 'teamcontestantc'));
     $this->setHead(Butler::getORMManager()->createMember()->wrap($mapping, 'teamhead'));
     $this->setCoach(Butler::getORMManager()->createMember()->wrap($mapping, 'teamcoach'));
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:14,代碼來源:Team.php

示例3: wrap

 /**
  * @param  $mapping
  * @return Member
  */
 public function wrap($mapping, $prefix = '')
 {
     $result = parent::wrap(array('id', 'name', 'role', 'teamid'), 'member', $mapping, $prefix);
     $this->user = Butler::getORMManager()->createUser()->wrap($mapping, $prefix . 'member');
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:10,代碼來源:Member.php

示例4: wrap

 /**
  * @param  $mapping
  * @return User
  */
 public function wrap($mapping, $prefix = '')
 {
     $result = parent::wrap(array('id', 'letter', 'publishedAfter'), 'problem', $mapping, $prefix);
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:9,代碼來源:Problem.php

示例5: wrap

 /**
  * @param  $mapping
  * @return PersonalInfo
  */
 public function wrap($mapping, $prefix = '')
 {
     $result = parent::wrap(array('id', 'userId', 'surname', 'name', 'patrName', 'birthDate', 'passportNo', 'passportDate', 'passportIssue', 'PTPN', 'phone', 'region', 'city', 'postIndex', 'address'), 'persinfo', $mapping, $prefix);
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:9,代碼來源:PersonalInfo.php

示例6: wrap

 /**
  * @param  $mapping
  * @return User
  */
 public function wrap($mapping, $prefix = '')
 {
     $result = parent::wrap(array('id', 'nickname', 'info', 'city', 'studyplace', 'division', 'tatarstan'), 'user', $mapping, $prefix);
     $this->personalInfo = Butler::getORMManager()->createPersonalInfo()->wrap($mapping, $prefix . 'user');
     return $result;
 }
開發者ID:bearf,項目名稱:xicl-web-interface,代碼行數:10,代碼來源:User.php


注:本文中的Shell::wrap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。