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


PHP Client::setName方法代码示例

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


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

 function test_setName()
 {
     //Arrange
     $name = "Sasha";
     $id = null;
     $test_stylist = new Stylist($name, $id);
     $test_stylist->save();
     $c_name = "Garry Gergich";
     $phone = "503-472-8959";
     $stylist_id = $test_stylist->getId();
     $test_client = new Client($c_name, $phone, $id, $stylist_id);
     $new_c_name = "Jerry Gergich";
     //Act
     $test_client->setName($new_c_name);
     //Assert
     $this->assertEquals($test_client->getName(), $new_c_name);
 }
开发者ID:jcubed22,项目名称:Hair_SalonSQL,代码行数:17,代码来源:ClientTest.php

示例3: fromArray

 public static function fromArray($data)
 {
     $client = new Client();
     if (isset($data['name'])) {
         $client->setName($data['name']);
     }
     if (isset($data['company'])) {
         $client->setCompany($data['company']);
     }
     if (isset($data['vat_number'])) {
         $client->setVatNumber($data['vat_number']);
     }
     if (isset($data['tax_number'])) {
         $client->setTaxNumber($data['tax_number']);
     }
     if (isset($data['address'])) {
         $client->setAddress(Address::fromArray($data['address']));
     }
     return $client;
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:20,代码来源:Client.php

示例4: testSetGet

 public function testSetGet()
 {
     $client = new Client();
     $id = 'test_id';
     $client->setId($id);
     $this->assertEquals($id, $client->getId(), 'Unable to setup id!');
     $name = 'test_name';
     $client->setName($name);
     $this->assertEquals($name, $client->getName(), 'Unable to setup name!');
     $title = 'test_title';
     $client->setTitle($title);
     $this->assertEquals($title, $client->getTitle(), 'Unable to setup title!');
     $userAttributes = ['attribute1' => 'value1', 'attribute2' => 'value2'];
     $client->setUserAttributes($userAttributes);
     $this->assertEquals($userAttributes, $client->getUserAttributes(), 'Unable to setup user attributes!');
     $normalizeUserAttributeMap = ['name' => 'some/name', 'email' => 'some/email'];
     $client->setNormalizeUserAttributeMap($normalizeUserAttributeMap);
     $this->assertEquals($normalizeUserAttributeMap, $client->getNormalizeUserAttributeMap(), 'Unable to setup normalize user attribute map!');
     $viewOptions = ['option1' => 'value1', 'option2' => 'value2'];
     $client->setViewOptions($viewOptions);
     $this->assertEquals($viewOptions, $client->getViewOptions(), 'Unable to setup view options!');
 }
开发者ID:aivavic,项目名称:yii2,代码行数:22,代码来源:BaseClientTest.php

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

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

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

示例8: isset

 }
 // validation for $keyuan
 $keyuan = isset($_POST["keyuan"]) ? strip_tags($_POST["keyuan"]) : null;
 // validation for $beizhu
 $beizhu = isset($_POST["beizhu"]) ? $_POST["beizhu"] : null;
 /// proceed submission
 // proceed for $user_id
 if (!empty($user_id)) {
     $object->setUserId($user_id);
 }
 // proceed for $type
 if (!empty($type)) {
     $object->setType($type);
 }
 // proceed for $name
 $object->setName($name);
 // proceed for $dob
 $object->setDob($dob);
 // 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
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:31,代码来源:client_create.php

示例9: Product

require_once "bootstrap.php";
require_once 'src/product.php';
require_once 'src/client.php';
// $newProductName = $argv[1];
$product0 = new Product();
$product1 = new Product();
$product2 = new Product();
$product0->setName($argv[1]);
$product1->setName($argv[2]);
$product2->setName($argv[3]);
$client0 = new Client();
$client1 = new Client();
$client2 = new Client();
$client0->setName("Phoenix");
$client1->setName("Kayzen");
$client2->setName("SuperNova");
$client0->setAge(23);
$client1->setAge(21);
$client2->setAge(25);
$client0->products[] = $product0;
$client0->products[] = $product1;
$client0->products[] = $product2;
// $client0->add($product0);
// $client0->add($product1);
// $client0->add($product2);
$client0->products[] = $product0;
$client0->products[] = $product1;
$client0->products[] = $product2;
// $product0->add($client0);
// $product0->add($client1);
// $product0->add($client2);
开发者ID:AngersPhoenix,项目名称:ReadingFun,代码行数:31,代码来源:create_product.php

示例10: api

 public function api()
 {
     $this->load->language('sale/order');
     $this->document->setTitle($this->language->get('heading_title'));
     if ($this->validate() && isset($this->request->get['api'])) {
         // Change the client
         Client::setName('catalog');
         // App
         $app = new Catalog();
         // Initialise main classes
         $app->initialise();
         // Include any URL perameters
         foreach ($this->request->get as $key => $value) {
             if ($key != 'route' && $key != 'token' && $key != 'store_id') {
                 $app->request->get[$key] = $value;
             }
         }
         $app->request->get['route'] = $this->request->get['api'];
         if ($this->request->post) {
             $app->request->post = $this->request->post;
         }
         $app->session->data['api_id'] = $this->config->get('config_api_id');
         // Load eCommerce classes
         $app->ecommerce();
         // Route the app
         $app->route();
         // Dispatch the app
         $app->dispatch();
         // Get the output
         $json = $app->response->getOutput();
         unset($app);
         // Return back to admin
         Client::setName('admin');
     } else {
         $response = array();
         $response['error'] = $this->error;
         unset($this->error);
         $json = json_encode($response);
     }
     $this->response->addHeader('Content-Type: application/json');
     $this->response->setOutput($json);
 }
开发者ID:cdsalmons,项目名称:arastta,代码行数:42,代码来源:order.php

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

示例12: die

<?php

/**
 * @package		Arastta eCommerce
 * @copyright	Copyright (C) 2015 Arastta Association. All rights reserved. (arastta.org)
 * @credits		See CREDITS.txt for credits and other copyright notices.
 * @license		GNU General Public License version 3; see LICENSE.txt
 */
if (version_compare(PHP_VERSION, '5.3.10', '<')) {
    die('Your host needs to use PHP 5.3.10 or higher to run Arastta.');
}
define('AREXE', 1);
require_once 'define.php';
// Startup
require_once DIR_SYSTEM . 'library/client.php';
Client::setName('catalog');
require_once DIR_SYSTEM . 'startup.php';
// App
$app = new Catalog();
// Initialise main classes
$app->initialise();
// Load eCommerce classes
$app->ecommerce();
// Route the app
$app->route();
// Dispatch the app
$app->dispatch();
// Render the output
$app->render();
开发者ID:sojimaxi,项目名称:arastta,代码行数:29,代码来源:index.php

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

示例14: pdf

 public function pdf($dest = 'D')
 {
     $url = '';
     if (isset($this->request->get['filter_invoice_number'])) {
         $url .= '&filter_invoice_number=' . urlencode(html_entity_decode($this->request->get['filter_invoice_number'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_order_id'])) {
         $url .= '&filter_order_id=' . $this->request->get['filter_order_id'];
     }
     if (isset($this->request->get['filter_customer'])) {
         $url .= '&filter_customer=' . urlencode(html_entity_decode($this->request->get['filter_customer'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_total'])) {
         $url .= '&filter_total=' . $this->request->get['filter_total'];
     }
     if (isset($this->request->get['filter_invoice_date'])) {
         $url .= '&filter_invoice_date=' . $this->request->get['filter_invoice_date'];
     }
     if (isset($this->request->get['sort'])) {
         $url .= '&sort=' . $this->request->get['sort'];
     }
     if (isset($this->request->get['order'])) {
         $url .= '&order=' . $this->request->get['order'];
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     if (!$this->validate()) {
         $this->response->redirect($this->url->link('sale/invoice', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     }
     $this->load->language('sale/order');
     $this->load->language('sale/invoice');
     $this->load->model('sale/order');
     $this->load->model('sale/invoice');
     if (isset($this->request->get['invoice_id'])) {
         $invoice_id = $this->request->get['invoice_id'];
     } else {
         $invoice_id = 0;
     }
     $invoice_info = $this->model_sale_invoice->getInvoice($invoice_id);
     if (!$invoice_info) {
         $this->session->data['error'] = $this->language->get('error_invoice_not_found');
         $this->response->redirect($this->url->link('sale/invoice', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     }
     Client::setName('catalog');
     $app = new Catalog();
     $app->initialise();
     $app->request->get['route'] = 'account/order/invoice';
     $app->request->get['order_id'] = $invoice_info['order_id'];
     $app->request->get['dest'] = $dest;
     $app->request->post = array();
     $app->ecommerce();
     $app->route();
     $app->dispatch();
     unset($app);
     // Return back to admin
     Client::setName('admin');
 }
开发者ID:cdsalmons,项目名称:arastta,代码行数:58,代码来源:invoice.php

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


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