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


PHP Client::setEmail方法代码示例

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


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

示例1: save

 public function save($con = null)
 {
     $c = new Client();
     $c->setName($this->getValue("name"));
     $c->setDepartment($this->getValue("department"));
     $c->setAddress($this->getValue("address"));
     $c->setEmail($this->getValue("email"));
     $c->setPhone($this->getValue("phone"));
     $c->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:10,代码来源:ClientForm.class.php

示例2: createperiodicalClients

 function createperiodicalClients()
 {
     $now = Carbon::Now();
     $criteria = new AndStatement();
     $field = $this->clientPeriodicalDao->getQHourName();
     $criteria->addStatement($field . "=" . $now->hour);
     $periodicalClients = $this->clientPeriodicalDao->find($criteria, null);
     if (is_null($periodicalClients) || is_string($periodicalClients)) {
         $mail_ob = new Mail();
         $mail_ob->setTo("just.urbonas@gmail.com");
         $mail_ob->setText("Nepavyko nuskaityti periodiniu klientu." . (is_string($periodicalClients) ? $periodicalClients : ""));
         $mail_ob->setSubject("WorkFlow.kaizensistema.lt | Nepavyko nuskaityti periodiniu klientu.");
         $mail_ob->sendMail();
         return false;
     }
     foreach ($periodicalClients as $client) {
         $createNewClient = false;
         if ($client->getPeriod_type() == 1) {
             $createNewClient = true;
         }
         if ($client->getPeriod_type() == 2 && $now->isWeekday()) {
             $createNewClient = true;
         }
         if ($client->getPeriod_type() == 3 && $now->day == $client->getMonth_day()) {
             $createNewClient = true;
         }
         if ($client->getPeriod_type() == 4) {
             $monthBegin = $now->copy()->startOfMonth();
             while ($monthBegin->dayOfWeek != $client->getWeek_day()) {
                 $monthBegin->addDay();
             }
             if ($monthBegin->isSameDay($now)) {
                 $createNewClient = true;
             }
         }
         if ($client->getPeriod_type() == 5) {
             $monthEnd = $now->copy()->endOfMonth();
             while ($monthEnd->dayOfWeek != $client->getWeek_day()) {
                 $monthEnd->subDay();
             }
             if ($monthEnd->isSameDay($now)) {
                 $createNewClient = true;
             }
         }
         if ($createNewClient) {
             $newClient = new Client();
             $newClient->setPid($client->getPid());
             $newClient->setName($client->getName());
             $newClient->setEmail($client->getEmail());
             $newClient->setCustomer($client->getCustomer());
             $newClient->setTelephone($client->getTelephone());
             $newClient->setComment($client->getComment());
             $newClient->setActive(true);
             $newClient->setPeriodical(true);
             $newClient->setPeriodicalid($client->getId());
             $newClient->setR_date($now->toDateTimeString());
             $newClient->setR_user(988);
             $store = $this->storeClient($newClient);
             if (!$store) {
                 $mail_ob = new Mail();
                 $mail_ob->setTo("just.urbonas@gmail.com");
                 $mail_ob->setText(print_r($newClient, true));
                 $mail_ob->setSubject("WorkFlow.kaizensistema.lt | Nepavyko sukurti periodinio kliento.");
                 $mail_ob->sendMail();
             } else {
                 $eventHistory = new EventHistory();
                 $eventHistory->setPid($newClient->getPid());
                 $eventHistory->setCid($newClient->getId());
                 $eventHistory->setR_date($newClient->getR_date());
                 $eventHistory->setDescription("Sukurtas kaip periodinis klientas");
                 $this->storeEventHistory($eventHistory);
             }
         }
     }
 }
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:75,代码来源:jobApp.class.php

示例3: transformJobs


//.........这里部分代码省略.........
             }
         }
         if (is_null($endTime)) {
             $endTime = $shootEnd;
         }
         if (is_null($startTime)) {
             $startTime = $shootStart;
         }
         if ($j->getCity() == "Boston") {
             $j->setZip("02101");
         } else {
             $j->setZip("02155");
         }
         $j->setNotes($notes);
         $j->setState("Massachusetts");
         list($hour, $min, $sec) = explode(":", $endTime);
         list($shour, $smin, $ssec) = explode(":", $startTime);
         $t = new DateTime();
         $t->setTime($hour, $min, $sec);
         $j->setEndTime($t);
         $t = new DateTime();
         $t->setTime($shour, $smin, $ssec);
         $j->setStartTime($t);
         $j->addTag($slug);
         if (isset($this->jobProjectKeys[$jid])) {
             $j->setProjectId($this->projectKeys[$this->jobProjectKeys[$jid]]);
         }
         while (count($jobList) - 1 != $jid) {
             $jobList[] = false;
         }
         $jobList[intval($jid)] = array("job" => $j, "del" => $del, "photog" => $photog);
     }
     for ($i = 1; $i < count($jobList); $i++) {
         sleep(1);
         $obj = $jobList[$i];
         $c = new Criteria();
         $c->add(JobPeer::ID, $i);
         if (JobPeer::doCount($c) > 0) {
             continue;
         }
         echo $i . "/" . $total . "\n";
         // keep the ids lined up
         if ($obj == false) {
             $myJob = new Job();
             try {
                 $myJob->save();
             } catch (Exception $ex) {
                 echo $ex->getMessage();
             }
             $myJob->delete();
         } else {
             $j = $obj["job"];
             $del = $obj["del"];
             $photog = $obj["photog"];
             try {
                 $j->save();
             } catch (Exception $ex) {
                 echo $ex->getMessage();
                 echo $ex->getTraceAsString();
             }
             $del->setJobId($j->getId());
             $del->save();
             $this->jobKeys[$jid] = $j->getId();
             if ($photog) {
                 $jp = new JobPhotographer();
                 $jp->setPhotographerId($this->photogKeys[$photog]);
                 $jp->setJobId($j->getId());
                 try {
                     $jp->save();
                 } catch (Exception $ex) {
                     echo $ex->getMessage();
                 }
             }
             // add the requester as a client
             $c = new Criteria();
             $c->add(sfGuardUserPeer::USERNAME, $j->getContactEmail());
             if (ClientPeer::doCount($c) == 0 && trim(strlen($j->getContactEmail())) != 0) {
                 $user = new sfGuardUser();
                 $user->setUsername($j->getContactEmail());
                 $user->setPassword("admin");
                 $user->save();
                 $userProfile = new sfGuardUserProfile();
                 $userProfile->setUserId($user->getId());
                 $userProfile->setUserTypeId(sfConfig::get("app_user_type_client"));
                 $userProfile->save();
                 $clientProfile = new Client();
                 $clientProfile->setUserId($userProfile->getId());
                 $clientProfile->setName($j->getContactName());
                 $clientProfile->setEmail($j->getContactEmail());
                 $clientProfile->setPhone($j->getContactPhone());
                 $clientProfile->save();
                 $jobClient = new JobClient();
                 $jobClient->setClientId($clientProfile->getId());
                 $jobClient->setJobId($j->getId());
                 $jobClient->save();
             }
         }
         $count += 1;
     }
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:101,代码来源:transformYAML.php

示例4: save

 public function save($con = null)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Object', 'Tag', 'Text', 'PMRender', 'Asset', 'Helper'));
     $j = new Job();
     $j->setEvent($this->getValue("event"));
     $j->setStartTime($this->getValue("start_time"));
     $j->setEndTime($this->getValue("end_time"));
     $j->setDate($this->getValue("date"));
     $j->setDueDate($this->getValue("due_date"));
     $j->setAcctNum($this->getValue("acct_num"));
     $j->setDeptId($this->getValue("dept_id"));
     $j->setPublicationId($this->getValue("publication_id"));
     $j->setStreet($this->getValue("street"));
     $j->setCity($this->getValue("city"));
     $j->setState($this->getValue("state"));
     $j->setZip($this->getValue("zip"));
     if (is_array($this->getValue("photo_type"))) {
         $j->setPhotoType(implode(", ", $this->getValue("photo_type")));
     } else {
         $j->setPhotoType($this->getValue("photo_type"));
     }
     $j->setOther($this->getValue("other"));
     $j->setQues1($this->getValue("ques1"));
     $j->setQues2($this->getValue("ques2"));
     $j->setQues3($this->getValue("ques3"));
     $j->setContactName($this->getValue("contact_name"));
     $j->setContactPhone($this->getValue("contact_phone"));
     $j->setContactEmail($this->getValue("contact_email"));
     $j->setStatusId(sfConfig::get("app_job_status_pending", 1));
     $j->setProjectId($this->getValue("project_id"));
     $j->save();
     $body = "Dear {$this->getValue("name")},\r\n\r\nYour job, {$this->getValue("event")}, has been entered into our system. \r\nIf you wish to track the progress of your job, you may do so at http://jobs.tuftsphoto.com \r\n\r\nThanks for using University Photography; we look forward to working with you! \r\n\r\nThe Tufts Photo Team \r\nUniversity Photography\r\n80 George St., First Floor\r\nMedford, MA 02155\r\nTel: 617.627.4282\r\nFax: 617.627.3549\r\nphoto@tufts.edu\r\n\r\n\r\n" . getJobDetails($j);
     mail($this->getValue("email") . ", photo@tufts.edu", "University Photography Job #" . $j->getId() . " - " . $j->getEvent(), $body, "From: photo@tufts.edu");
     $user = sfContext::getInstance()->getUser();
     if ($this->getValue("clientId") > 0 && ($user->hasCredential("client") || $user->hasCredential("admin"))) {
         $client = ClientPeer::retrieveByPK($this->getValue("clientId"));
         $j->addClient($client);
     }
     // if they are a user lets make them a client
     if ($user->getProfile()->getUserType()->getId() == sfConfig::get("app_user_type_user")) {
         $clientProfile = new Client();
         $clientProfile->setUserId($user->getProfile()->getId());
         $clientProfile->setName($this->getValue("name"));
         $clientProfile->setDepartment($this->getValue("department"));
         $clientProfile->setAddress($this->getValue("address"));
         $clientProfile->setEmail($this->getValue("email"));
         $clientProfile->setPhone($this->getValue("phone"));
         $clientProfile->save();
         $user->getProfile()->setUserTypeId(sfConfig::get("app_user_type_client"));
         $user->getProfile()->save();
         $user->clearCredentials();
         $user->addCredential("client");
     } else {
         if ($user->getProfile()->getUserType()->getId() == sfConfig::get("app_user_type_client")) {
             $c = new Criteria();
             $c->add(ClientPeer::USER_ID, $user->getProfile()->getId());
             $clientProfile = ClientPeer::doSelectOne($c);
             if (is_null($clientProfile)) {
                 $clientProfile = new Client();
             }
             $clientProfile->setUserId($user->getProfile()->getId());
             $clientProfile->setName($this->getValue("name"));
             $clientProfile->setDepartment($this->getValue("department"));
             $clientProfile->setAddress($this->getValue("address"));
             $clientProfile->setEmail($this->getValue("email"));
             $clientProfile->setPhone($this->getValue("phone"));
             $clientProfile->save();
         }
     }
     if (isset($clientProfile) && !is_null($clientProfile)) {
         $j->addClient($clientProfile);
     }
     return $j->getId();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:74,代码来源:RequestJobForm.class.php

示例5: importAction

 function importAction()
 {
     if (!isset($_POST['client'])) {
         $this->setOutPut(array("error" => $this->errorCode['param_not_found']));
         return false;
     }
     $client = json_decode(urldecode($_POST['client']));
     //$client = $this->utf8Decode($client1);
     //var_dumpas($client['projectKey']);
     if (!isset($client->projectKey) || is_null($client->projectKey)) {
         $this->setOutPut(array("error" => $this->errorCode['wrong_param']));
         return false;
     }
     $project = $this->getProject($client->projectKey, $client);
     if (!is_object($project)) {
         return false;
     }
     if (!isset($client->name) || is_null($client->name)) {
         $this->setOutPut(array("error" => $this->errorCode['wrong_param']));
         return false;
     }
     if (!isset($client->email) || is_null($client->email)) {
         $this->setOutPut(array("error" => $this->errorCode['wrong_param']));
         return false;
     }
     if (!isset($client->telephone) || is_null($client->telephone)) {
         $this->setOutPut(array("error" => $this->errorCode['wrong_param']));
         return false;
     }
     /*if (!isset($client->comment) || is_null($client->comment)){
           $this->setOutPut(array("error" => $this->errorCode['wrong_param']));
           return false;
       }*/
     $now = Carbon::Now();
     //Kuriam nauja klienta
     $newClient = new Client();
     $newClient->setPid($project->getId());
     $newClient->setName(substr($client->name, 0, 255));
     $newClient->setEmail(substr($client->email, 0, 255));
     $newClient->setTelephone(substr($client->telephone, 0, 50));
     $newClient->setComment(substr($client->comment, 0, 255));
     $newClient->setCustomer(substr($client->customer, 0, 255));
     $newClient->setActive(true);
     $newClient->setPeriodical(false);
     $newClient->setPeriodicalid(0);
     $newClient->setR_date($now->toDateTimeString());
     $newClient->setR_user(977);
     $store = $this->storeClient($newClient);
     if (!$store) {
         $this->setOutPut(array("error" => $this->errorCode['client_not_stored']));
         $mail_ob = new Mail();
         $mail_ob->setTo("just.urbonas@gmail.com");
         $mail_ob->setText(print_r($newClient, true));
         $mail_ob->setSubject("WorkFlow.kaizensistema.lt | Nepavyko sukurti importo kliento.");
         $mail_ob->sendMail();
         return false;
     } else {
         $eventHistory = new EventHistory();
         $eventHistory->setPid($newClient->getPid());
         $eventHistory->setCid($newClient->getId());
         $eventHistory->setR_date($newClient->getR_date());
         $eventHistory->setDescription(!is_null($client->from) ? $client->from : "Sukurtas integracijos metu");
         $this->storeEventHistory($eventHistory);
     }
     $this->setOutPut(array("ok" => "ok"));
 }
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:66,代码来源:apiApp.class.php

示例6: Message

    // proceed for $chushengriqi
    $object->setChushengriqi($chushengriqi);
    // proceed for $xueli
    if (!empty($xueli)) {
        $object->setXueli($xueli);
    }
    // proceed for $yasichengji
    if (!empty($yasichengji)) {
        $object->setYasichengji($yasichengji);
    }
    // proceed for $dianhua
    $object->setDianhua($dianhua);
    // proceed for $dizhi
    $object->setDizhi($dizhi);
    // proceed for $email
    $object->setEmail($email);
    // proceed for $keyuan
    if (!empty($keyuan)) {
        $object->setKeyuan($keyuan);
    }
    // proceed for $beizhu
    $object->setBeizhu($beizhu);
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Record saved", "zh" => "记录保存成功"))));
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:31,代码来源:client_create.php

示例7: createClients10

 public function createClients10()
 {
     $client10 = new Client();
     $client10->setId('10');
     $client10->setNome('NELSON MANDELA');
     $client10->setTelefone('1010-1010');
     $client10->setEndereco('RUA DO CLIENTE 10');
     $client10->setEmail('cliente10@teste.com.br');
     $client10->setCpf('999.999.999-10');
     $client10->setTipo('PF');
     return $client10;
 }
开发者ID:rafaelcostatech,项目名称:Poo2,代码行数:12,代码来源:ClientsCreation.php

示例8: find

 function find($criteria = null, $order = null, $limit = 1000, $from = 0)
 {
     $result = $this->database->query($this->buildFindQuery($criteria, $order, $limit, $from));
     if (!is_null($result->getError())) {
         return $result->getError();
     }
     $clients = array();
     while ($row = $result->fetchRow()) {
         $client = new Client();
         $value = $row[0];
         $client->setId($value);
         $value = $row[1];
         $client->setPid($value);
         $value = $row[2];
         $client->setName($value);
         $value = $row[3];
         $client->setEmail($value);
         $value = $row[4];
         $client->setTelephone($value);
         $value = $row[5];
         $client->setCustomer($value);
         $value = $row[6];
         $client->setComment($value);
         $value = $row[7];
         $value = $this->database->toBoolean($value);
         $client->setActive($value);
         $value = $row[8];
         $value = $this->database->toBoolean($value);
         $client->setEnded($value);
         $value = $row[9];
         $value = $this->database->toBoolean($value);
         $client->setEnded_eve($value);
         $value = $row[10];
         $value = $this->database->toBoolean($value);
         $client->setMoved($value);
         $value = $row[11];
         $value = $this->database->toBoolean($value);
         $client->setPeriodical($value);
         $value = $row[12];
         $client->setPeriodicalid($value);
         $value = $row[13];
         $value = $this->database->toBoolean($value);
         $client->setCan_create($value);
         $value = $row[14];
         $client->setR_date($value);
         $value = $row[15];
         $client->setR_user($value);
         if ($order != null) {
             array_push($clients, $client);
         } else {
             $clients[$client->getId()] = $client;
         }
     }
     return $clients;
 }
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:55,代码来源:clientDao.class.php

示例9: saveSubscriber


//.........这里部分代码省略.........
         }
         if ($campaignType == -1) {
             $this->setParamPoz($getResponse->getId(), 2, "Nepavyko nustatyti kampanijos tipo");
             return FALSE;
         }
         $newClient = FALSE;
         //Aktyvavimo kampanija
         if ($campaignType == 1) {
             // Patikrinam ar neegzistuoja toks klientas
             $criteria = new AndStatement();
             $field = $this->clientDaol->getQPidName();
             $criteria->addStatement($field . "='" . addslashes($project->getId()) . "'");
             $field = $this->clientDaol->getQEmailName();
             $criteria->addStatement($field . "='" . addslashes($getResponse->getContact_email()) . "'");
             $clients = $this->clientDaol->find($criteria, NULL, 1000);
             if (is_null($clients)) {
                 $this->setParamPoz($getResponse->getId(), 2, "Nepavyko patikrinti ar toks klientas jau uzregistruotas [1]");
                 return FALSE;
             } else {
                 if (is_string($clients)) {
                     $this->setParamPoz($getResponse->getId(), 2, "Nepavyko patikrinti ar toks klientas jau uzregistruotas [2]");
                     return FALSE;
                 } else {
                     if (!is_array($clients)) {
                         $this->setParamPoz($getResponse->getId(), 2, "Nepavyko patikrinti ar toks klientas jau uzregistruotas [3]");
                         return FALSE;
                     }
                 }
             }
             if (count($clients) == 0) {
                 //Jei neradome kliento - kuriame nauaja
                 $client = new Client();
                 $client->setPid($project->getId());
                 $client->setEmail($getResponse->getContact_email());
                 $client->setTelephone($getResponse->getContact_name());
                 $client->setActive(TRUE);
                 $newClient = TRUE;
             } else {
                 $client = reset($clients);
                 if (!$client->isActive() && !$client->isEnded()) {
                     $client->setActive(TRUE);
                     $this->saveEventHistory($client, "Aktyvuotas GetResponse sistemos");
                 } else {
                     $this->setParamPoz($getResponse->getId(), 2, "Klientas jau yra sukurtas projekte ir yra aktyvus arba pabaigtas");
                     return FALSE;
                 }
             }
         }
         //Suspendavimo kampanija
         if ($campaignType == 0) {
             $criteria = new AndStatement();
             $field = $this->clientDaol->getQPidName();
             $criteria->addStatement($field . "='" . addslashes($project->getId()) . "'");
             $field = $this->clientDaol->getQEmailName();
             $criteria->addStatement($field . "='" . addslashes($getResponse->getContact_email()) . "'");
             $field = $this->clientDaol->getQActiveName();
             $criteria->addStatement($field . "='1'");
             $clients = $this->clientDaol->find($criteria, NULL, 1000);
             if (is_null($clients)) {
                 $this->setParamPoz($getResponse->getId(), 2, "Nerastas klientas [1]");
                 return FALSE;
             } else {
                 if (is_string($clients)) {
                     $this->setParamPoz($getResponse->getId(), 2, "Nerastas klientas [2]");
                     return FALSE;
                 } else {
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:67,代码来源:getResponseApp.class.php

示例10: actionSaveClient

 function actionSaveClient($currentProject)
 {
     $backUrl = $this->context->getFlowScopeAttr("backUrl");
     $projectID = $this->context->getRequestAttr("projectID");
     $edit = $this->context->getRequestAttr("edit");
     $client = new Client();
     $clientErrs = array();
     $client->setId($this->context->getRequestAttr("id"));
     $client->setPid($this->context->getRequestAttr("projectID"));
     $client->setName($this->context->getRequestAttr("name"));
     if (!is_null($client->getName())) {
         $client->setName(trim($client->getName()));
         if (strlen($client->getName()) < 1) {
             $client->setName(null);
         }
     }
     if (is_null($client->getName())) {
         $clientErrs["name"] = "field.error.empty";
     }
     $client->setEmail($this->context->getRequestAttr("email"));
     if (!is_null($client->getEmail())) {
         $client->setEmail(trim($client->getEmail()));
         if (strlen($client->getEmail()) < 1) {
             $client->setEmail(null);
         }
     }
     if (is_null($client->getEmail())) {
         $clientErrs["email"] = "field.error.empty";
     }
     $client->setTelephone($this->context->getRequestAttr("telephone"));
     if (!is_null($client->getTelephone())) {
         $client->setTelephone(trim($client->getTelephone()));
         if (strlen($client->getTelephone()) < 1) {
             $client->setTelephone(null);
         }
     }
     $client->setCustomer($this->context->getRequestAttr("customer"));
     if (!is_null($client->getCustomer())) {
         $client->setCustomer(trim($client->getCustomer()));
         if (strlen($client->getCustomer()) < 1) {
             $client->setCustomer(null);
         }
     }
     $client->setComment($this->context->getRequestAttr("comment"));
     if (!is_null($client->getComment())) {
         $client->setComment(trim($client->getComment()));
         if (strlen($client->getComment()) < 1) {
             $client->setComment(null);
         }
     }
     $client->setPeriodical(false);
     $client->setPeriodicalid(0);
     $timeZone = new DateTimeZone("Europe/Vilnius");
     $time = new DateTime("now", $timeZone);
     $client->setR_date($time->format("Y-m-d H:i:s"));
     $client->setR_user(777);
     $client->setActive(true);
     $this->context->setFlashScopeAttr("createClient", $client);
     $this->context->setFlashScopeAttr("clientErrs", $clientErrs);
     $this->context->setFlashScopeAttr("projectID", $projectID);
     if (count($clientErrs) >= 1) {
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     $insert = true;
     $store = $this->storeClient($client);
     if (!$store) {
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     if ($insert && $edit == 0) {
         $eventHistory = new EventHistory();
         $eventHistory->setPid($client->getPid());
         $eventHistory->setCid($client->getId());
         $eventHistory->setR_date($client->getR_date());
         $eventHistory->setDescription("Sukurtas partnerio");
         $this->storeEventHistory($eventHistory);
     }
     $this->cancelClientCreate();
     if (!is_null($backUrl)) {
         header("Location: " . $backUrl);
         return true;
     }
     return false;
 }
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:91,代码来源:partnerApp.class.php

示例11: User

$iwasaki->setName("岩崎", "拓海");
$iwasaki->setEmail("iwasaki@email.com");
$hayashi = new User();
$hayashi->setName("早矢仕", "玄");
$hayashi->setEmail("hayashi@email.com");
$object_seminar = new Seminar();
$object_seminar->setTitle("オブジェクト指向セミナー");
echo $object_seminar->getTitle() . '<BR>';
$object_seminar->attendAccept($iwasaki);
$object_seminar->attendAccept($saji);
$object_seminar->attendAccept($hayashi);
$object_seminar->getAttendList();
$object_seminar->cancelAccept($saji);
$object_seminar->getCancelList();
$object_seminar->getAttendList();
echo "<BR><BR><hr>";
echo "<h2>クライアントセミナーテスト</h2>";
echo "<BR>";
$client_seminar = new ClientSeminar();
$google = new Client();
$google->setName("Google");
$google->setEmail("jinji@gmail.com");
$client_seminar->setClient($google);
$client_seminar->setTitle("Google説明会");
$client_seminar->attendAccept($iwasaki);
$client_seminar->attendAccept($saji);
$client_seminar->attendAccept($hayashi);
$client_seminar->getAttendList();
$client_seminar->cancelAccept($saji);
$client_seminar->getCancelList();
$client_seminar->getAttendList();
开发者ID:slogan-tech,项目名称:object_oriented,代码行数:31,代码来源:execute_seminar.php

示例12: actionSaveClient

 function actionSaveClient($currentUser)
 {
     $backUrl = $this->context->getFlowScopeAttr("backUrl");
     $client = new Client();
     $clientErrs = array();
     $client->setId($this->context->getRequestAttr("id"));
     $client->setPid($this->context->getRequestAttr("projectID"));
     $client->setName($this->context->getRequestAttr("name"));
     if (!is_null($client->getName())) {
         $client->setName(trim($client->getName()));
         if (strlen($client->getName()) < 1) {
             $client->setName(null);
         }
     }
     if (is_null($client->getName())) {
         $clientErrs["name"] = "field.error.empty";
     }
     $client->setEmail($this->context->getRequestAttr("email"));
     if (!is_null($client->getEmail())) {
         $client->setEmail(trim($client->getEmail()));
         if (strlen($client->getEmail()) < 1) {
             $client->setEmail(null);
         }
     }
     if (is_null($client->getEmail())) {
         $clientErrs["email"] = "field.error.empty";
     }
     $client->setTelephone($this->context->getRequestAttr("telephone"));
     if (!is_null($client->getTelephone())) {
         $client->setTelephone(trim($client->getTelephone()));
         if (strlen($client->getTelephone()) < 1) {
             $client->setTelephone(null);
         }
     }
     $client->setCustomer($this->context->getRequestAttr("customer"));
     if (!is_null($client->getCustomer())) {
         $client->setCustomer(trim($client->getCustomer()));
         if (strlen($client->getCustomer()) < 1) {
             $client->setCustomer(null);
         }
     }
     $client->setComment($this->context->getRequestAttr("comment"));
     if (!is_null($client->getComment())) {
         $client->setComment(trim($client->getComment()));
         if (strlen($client->getComment()) < 1) {
             $client->setComment(null);
         }
     }
     $periodicalID = $this->context->getRequestAttr("periodicalid");
     $periodical = $this->context->getRequestAttr("periodCustomer");
     $client->setPeriodical($periodical == 1 ? true : false);
     $timeZone = new DateTimeZone("Europe/Vilnius");
     $time = new DateTime("now", $timeZone);
     $client->setR_date($time->format("Y-m-d H:i:s"));
     $client->setR_user($currentUser->getId());
     $client->setActive(true);
     if (!is_null($periodicalID) && !$client->isPeriodical()) {
         $this->clientPeriodicalDao->delete($periodicalID);
         $this->clientDaol->resetPeriodicalClients($periodicalID);
         $client->setPeriodicalid(0);
     }
     if ($client->isPeriodical()) {
         $clientPeriodical = new ClientPeriodical();
         $clientPeriodical->setId($periodicalID);
         $clientPeriodical->setPid($client->getPid());
         $clientPeriodical->setName($client->getName());
         $clientPeriodical->setEmail($client->getEmail());
         $clientPeriodical->setCustomer($client->getCustomer());
         $clientPeriodical->setTelephone($client->getTelephone());
         $clientPeriodical->setComment($client->getComment());
         $clientPeriodical->setR_date($time->format("Y-m-d H:i:s"));
         $clientPeriodical->setR_user($currentUser->getId());
         $clientPeriodical->setPeriod_type($this->context->getRequestAttr("period_type"));
         $clientPeriodical->setWeek_day($this->context->getRequestAttr("week_day"));
         $clientPeriodical->setMonth_day($this->context->getRequestAttr("month_day"));
         $clientPeriodical->setHour($this->context->getRequestAttr("hour"));
     } else {
         $clientPeriodical = new ClientPeriodical();
     }
     $this->context->setFlashScopeAttr("client", $client);
     $this->context->setFlashScopeAttr("clientPeriodical", $clientPeriodical);
     $this->context->setFlashScopeAttr("clientErrs", $clientErrs);
     $projectID = $client->getPid();
     if (!$this->setStoreProject($projectID, "clientProject")) {
         $this->cancelClientEdit();
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     if (count($clientErrs) >= 1) {
         if (!is_null($backUrl)) {
             header("Location: " . $backUrl);
             return true;
         }
         return false;
     }
     $insert = false;
     if (is_null($client->getId())) {
//.........这里部分代码省略.........
开发者ID:Faradejus,项目名称:WorkFlow,代码行数:101,代码来源:projectApp.class.php

示例13: array

<?php

require_once __DIR__ . DS . '..' . DS . '..' . DS . 'bootstrap.php';
if (is_cli()) {
    $names = array('ZHENG XIAOHONG', 'WANG LIANGLIANG', 'LI YUNQIAN', 'LIU SHITAO', 'CHENG LANLAN', 'SUN XINWEI', 'QIAN WUCHAO', 'ZHAO LIUYUN', 'TAN GUOQIANG', 'WEI BEIFEI', 'XIA FEIFEI');
    $shengs = array('上海市', '江苏省', '湖南省', '四川省', '云南省', '广西省', '广东省', '台湾省');
    $qus = array('宝山区', '周口店', '宁乡', '沩水镇', '张家界', '小四通', '黄埔区', '晋安区');
    $address = rand(10, 99) . '村' . rand(300, 900) . '号';
    $dob_range_start = 381416400;
    $dob_range_end = 917874000;
    foreach ($names as $name) {
        $client = new Client();
        $client->setType(array_rand(Client::$TYPEs));
        $client->setName($name);
        $client->setDob(rand($dob_range_start, $dob_range_end));
        $client->setXueli(array_rand(Client::$XUELIs));
        $client->setYasichengji(array_rand(Client::$YASIs));
        $client->setDianhua('+86 ' . rand(2156299999, 2156292999));
        $client->setDizhi($shengs[array_rand($shengs)] . ' ' . $qus[array_rand($qus)] . ' ' . $address);
        $client->setEmail(get_random_string(5) . '@gmail.com');
        $client->setKeyuan(array_rand(Client::$KEYUANs));
        $client->setCreatedAt(rand(1439164648, 1439264648));
        $client->setUserId(rand(3, 4));
        $client->save();
    }
}
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:26,代码来源:fixture.php

示例14: Client

<?php 
$erreur = false;
if ($action == "validation") {
    $nom = $_POST["nom"];
    $prenom = $_POST["prenom"];
    $email = $_POST["email"];
    if (!preg_match("/[A-Za-z]{2,30}/", $nom)) {
        $erreur = true;
    }
    if (!$erreur and !preg_match("/[A-Za-z]{2,30}/", $prenom)) {
        $erreur = true;
    }
    // ...
    if ($erreur) {
        $smarty->display("{$page}.tpl");
    } else {
        $client = new Client();
        $client->setNom($nom);
        $client->setPrenom($prenom);
        $client->setEmail($email);
        $client->save();
        $smarty->display("CompteClient.tpl");
    }
} else {
    $smarty->display("{$page}.tpl");
}
开发者ID:emmamau,项目名称:archiCNAM,代码行数:26,代码来源:client.php


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