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


PHP Registration::setName方法代碼示例

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


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

示例1: testDeleteForceCascadeOneToMany

 public function testDeleteForceCascadeOneToMany()
 {
     $event = new Event();
     $event->setTitle('Delete Restrict Event');
     $event->setStartDate(new fDate());
     $event->store();
     $registration = new Registration();
     $registration->setEventId($event->getEventId());
     $registration->setName('Will');
     $registration->store();
     $event->delete(TRUE);
     $this->assertEquals(FALSE, $event->exists());
 }
開發者ID:netcarver,項目名稱:flourish,代碼行數:13,代碼來源:fActiveRecordTest.php

示例2: Registration

<?php

$html->setH1('PŘIHLÁŠKY');
$html->addTitle("Přihlášky");
$html->addCss('<link rel="stylesheet" href="views/css/registration.css" type="text/css" media="screen">');
$html->addScript('<script src="js/registration.js"></script>');
$registration = new Registration();
$saved = "";
if (isset($_GET['saved']) && $_GET['saved'] == 1) {
    $saved = "Přihláška byla odeslána.";
}
$category_men = $registration->getCategories('m');
$category_women = $registration->getCategories('f');
if (isset($_POST['name'])) {
    $registration->setName($_POST['name']);
    $registration->setPohlavi($_POST['pohlavi']);
    $registration->setYear($_POST['year']);
    $registration->setClub($_POST['club']);
    $registration->setEmail($_POST['email']);
    $registration->setPoznamka($_POST['poznamka']);
    if ($registration->getPohlavi() == "m") {
        $registration->setCategory($_POST['category_m']);
    } else {
        $registration->setCategory($_POST['category_w']);
    }
    if ($registration->gerErr() == "") {
        $registration->save();
        header('Location: index.php?page=registration&saved=1');
    }
}
$list = (include 'controllers/registration/list.php');
開發者ID:ununik,項目名稱:DCRUN,代碼行數:31,代碼來源:registration.php


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