本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: wrap
/**
* @param $mapping
* @return User
*/
public function wrap($mapping, $prefix = '')
{
$result = parent::wrap(array('id', 'letter', 'publishedAfter'), 'problem', $mapping, $prefix);
return $result;
}
示例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;
}
示例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;
}