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


PHP client::save方法代码示例

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


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

示例1: save

 function save()
 {
     $rtn = parent::save();
     $c = new client();
     $c->set_id($this->get_value("clientID"));
     $c->select();
     $c->save();
     return $rtn;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:9,代码来源:clientContact.inc.php

示例2: date

$clientID = $_POST["clientID"] or $clientID = $_GET["clientID"];
if ($_POST["save"]) {
    if (!$_POST["clientName"]) {
        alloc_error("Please enter a Client Name.");
    }
    $client->read_globals();
    $client->set_value("clientModifiedTime", date("Y-m-d"));
    $clientID = $client->get_id();
    $client->set_values("client_");
    if (!$client->get_id()) {
        // New client.
        $client->set_value("clientCreatedTime", date("Y-m-d"));
        $new_client = true;
    }
    if (!$TPL["message"]) {
        $client->save();
        $clientID = $client->get_id();
        $client->set_values("client_");
    }
} else {
    if ($_POST["save_attachment"]) {
        move_attachment("client", $clientID);
        alloc_redirect($TPL["url_alloc_client"] . "clientID=" . $clientID . "&sbs_link=attachments");
    } else {
        if ($_GET["get_vcard"]) {
            $clientContact = new clientContact();
            $clientContact->set_id($_GET["clientContactID"]);
            $clientContact->select();
            $clientContact->output_vcard();
            return;
        } else {
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:client.php

示例3: stylist

 function test_deleteClient()
 {
     //Arrange
     $name = "Tessa";
     $id = null;
     $test_stylist = new stylist($name, $id);
     $test_stylist->save();
     $test_stylist_id = $test_stylist->getId();
     $name = "Mai";
     $description = "Scary";
     $visits = 3;
     $name2 = "Doory";
     $description2 = "Not worth it.";
     $visits2 = 4;
     $test_client = new client($name, $test_stylist_id, $id, $visits, $description);
     $test_client2 = new client($name2, $test_stylist_id, $id, $visits2, $description2);
     $test_client->save();
     $test_client2->save();
     //Act
     $test_client->deleteClient();
     //Assert
     $this->assertEquals([$test_client2], client::getAll());
 }
开发者ID:alexMcosta,项目名称:Salon_Assesment,代码行数:23,代码来源:ClientTest.php

示例4: postCreateclient

 public function postCreateclient()
 {
     $validator = Validator::make(Input::all(), ['client_name' => 'required', 'company_internal_name' => 'required', 'company_internal_code' => 'required', 'client_code' => 'required']);
     if ($validator->fails()) {
         //dd($validator);
         return redirect('admin/orders')->withErrors($validator)->withInput();
     } else {
         //$date = date('Y-m-d H:i:s');
         $client = new client();
         $client->client_name = Input::get('client_name');
         $client->company_internal_name = Input::get('company_internal_name');
         $client->company_internal_code = Input::get('company_internal_code');
         $client->client_code = Input::get('client_code');
         $client->save();
         return redirect('admin/orders')->with('new_client', 'New client profile created succesfully');
     }
 }
开发者ID:vikassaini26,项目名称:yarn,代码行数:17,代码来源:AdminController.php

示例5: client

 function test_updateName()
 {
     $client_name = "Rob";
     $stylist_id = 1;
     $test_client = new client($client_name, $stylist_id);
     $test_client->save();
     $new_client_name = "Dingo";
     //Act
     $test_client->updateName($new_client_name);
     //Assert
     $this->assertEquals($test_client->getclientName(), "Dingo");
 }
开发者ID:bdspen,项目名称:hair_salon,代码行数:12,代码来源:ClientTest.php


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