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


PHP Client::getName方法代码示例

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


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

示例1: InsertNewClient

 public function InsertNewClient(Client $c = null)
 {
     if ($c == null || !$c instanceof Client) {
         return false;
     }
     $props = array("Name," => $c->getName(), "Alias," => $c->getAlias(), "ContactName," => $c->getContactName(), "Phone," => $c->getPhone(), "Country," => $c->getCountry(), "StateProv," => $c->getStateProv(), "City," => $c->getCity(), "ZipPostal," => $c->getZipPostal(), "DateAdded," => $c->getDateAdded(), "AddedByUserID," => $c->getAddedByUserID(), "OnSiteEmployee" => $c->getOnSiteEmployee());
     foreach ($props as $k => $v) {
         if ($v != null) {
             if ($k == "OnSiteEmployee") {
                 $_props[$k] = "{$v}";
             } else {
                 if (gettype($v) == "string") {
                     $_props[$k] = "'" . $v . "', ";
                 } else {
                     $_props[$k] = "{$v}, ";
                 }
             }
         }
     }
     $this->_dbAdapt->IStatement($this->dbTbl, $_props);
     $tmp = $this->_dbAdapt->getLnk();
     $tmp->query($this->_dbAdapt->getQry());
     unset($tmp);
     return true;
 }
开发者ID:B4RN3SCODE,项目名称:ASPM,代码行数:25,代码来源:ClientServiceAdapter.php

示例2: encodeClient

 public function encodeClient(Client $client)
 {
     $data = ['name' => $client->getName(), 'company' => $client->getCompany(), 'identifier' => $client->getIdentifier(), 'vat_number' => $client->getVatNumber(), 'tax_number' => $client->getTaxNumber()];
     if ($client->getAddress()) {
         $data['address'] = $this->encodeAddress($client->getAddress());
     }
     return $data;
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:8,代码来源:Serializer.php

示例3: testGetDefaults

 public function testGetDefaults()
 {
     $client = new Client();
     $this->assertNotEmpty($client->getName(), 'Unable to get default name!');
     $this->assertNotEmpty($client->getTitle(), 'Unable to get default title!');
     $this->assertNotNull($client->getViewOptions(), 'Unable to get default view options!');
     $this->assertNotNull($client->getNormalizeUserAttributeMap(), 'Unable to get default normalize user attribute map!');
 }
开发者ID:aivavic,项目名称:yii2,代码行数:8,代码来源:BaseClientTest.php

示例4: testGetName

 function testGetName()
 {
     $name = "Stuart";
     $phone = "555-555-5555";
     $stylist_id = 1;
     $test_client = new Client($name, $phone, $stylist_id);
     $result = $test_client->getName();
     $this->assertEquals($name, $result);
 }
开发者ID:CaseyH33,项目名称:Hair-Salon,代码行数:9,代码来源:ClientTest.php

示例5: Stylist

 function test_getName()
 {
     $name = "Jane Doe";
     $test_stylist = new Stylist($name);
     $test_stylist->save();
     $client_name = "Jimmy";
     $client_stylist_id = $test_stylist->getId();
     $test_client = new Client($client_name, $client_stylist_id);
     $result = $test_client->getName();
     $this->assertEquals($client_name, $result);
 }
开发者ID:juliocesardiaz,项目名称:HairSalon,代码行数:11,代码来源:ClientTest.php

示例6: Stylist

 function test_getName()
 {
     //Arrange
     $client_name = "Bill Withers";
     $client_phone = "5415134876";
     $stylist = new Stylist("Diane", "5035528959", "MPB", false);
     $stylist->save();
     $client = new Client($client_name, $client_phone, $stylist->getId());
     //Act
     $result = $client->getName();
     //Assert
     $this->assertEquals($client_name, $result);
 }
开发者ID:ashlinaronin,项目名称:hair-salon,代码行数:13,代码来源:ClientTest.php

示例7: Client

 function test_getName()
 {
     //Arrange
     $name = "Sandra Jane";
     $phone = "542-334-0984";
     $style_choice = "The Rachel";
     $stylist_id = 1;
     $id = null;
     $test_client = new Client($name, $phone, $style_choice, $stylist_id, $id);
     //Act
     $result = $test_client->getName();
     //Assert
     $this->assertEquals($name, $result);
 }
开发者ID:alexdbrown,项目名称:hair_salon,代码行数:14,代码来源:ClientTest.php

示例8: updateClient

 /**
  *
  * @param Client $client
  * @return type
  * @throws DaoException 
  */
 public function updateClient(Client $client)
 {
     try {
         $query = Doctrine_Query::create()->update('Client i');
         $query->set('i.name', '?', $client->getName());
         $query->set('i.address', '?', $client->getAddress());
         $query->set('i.tp_hp', '?', $client->getTpHp());
         $query->set('i.tp_home', '?', $client->getTpHome());
         $query->set('i.notes', '?', $client->getNotes());
         $query->where('i.id = ?', $client->getId());
         return $query->execute();
     } catch (Exception $e) {
         throw new DaoException($e->getMessage(), $e->getCode(), $e);
     }
 }
开发者ID:GarraouiMarwen,项目名称:open-stock-management,代码行数:21,代码来源:ClientDao.php

示例9: Stylist

 function test_getName()
 {
     //Arrange
     $name = "Erin";
     $id = null;
     $test_stylist = new Stylist($name, $id);
     $test_stylist->save();
     $name = "George";
     $stylist_id = $test_stylist->getId();
     $test_client = new Client($name, $stylist_id, $id);
     $test_client->save();
     //Act
     $result = $test_client->getName();
     //Assert
     $this->assertEquals($name, $result);
 }
开发者ID:kylepratuch,项目名称:hair_salon,代码行数:16,代码来源:ClientTest.php

示例10: Stylist

 function test_getName()
 {
     //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);
     //Act
     $result = $test_client->getName();
     //Assert
     $this->assertEquals($c_name, $result);
 }
开发者ID:jcubed22,项目名称:Hair_SalonSQL,代码行数:16,代码来源:ClientTest.php

示例11: testUpdate

 function testUpdate()
 {
     //Arrange
     $name = "Bob";
     $id = null;
     $test_stylist = new Stylist($name, $id);
     $test_stylist->save();
     $client_name = "Gertrude";
     $stylist_id = $test_stylist->getId();
     $test_client = new Client($client_name, $stylist_id, $id);
     $test_client->save();
     $new_client_name = "Billy";
     //Act
     $test_client->update($new_client_name);
     //Assert
     $this->assertEquals("Billy", $test_client->getName());
 }
开发者ID:r-hills,项目名称:Salon,代码行数:17,代码来源:ClientTest.php

示例12: checkTaxes

 public function checkTaxes(Client $client)
 {
     $haveDecl = false;
     foreach ($this->declarations as $k => $v) {
         if ($v->getClient() == $client) {
             echo 'Check for ' . $client->getName() . ' EGN: ' . $client->getEGN() . PHP_EOL;
             $haveDecl = true;
             foreach ($v->getAssetsList() as $key => $value) {
                 echo 'Asset: ' . $value->getName() . ' Price: ' . $value->getPrice() . ' Tax:' . $value->getTax() . PHP_EOL;
             }
             echo PHP_EOL;
         }
     }
     if (!$haveDecl) {
         throw new Exception('No Declaration of this person !!');
     } else {
         $s = new Service($this->employees[0], $client, 'Check');
         $this->services[] = $s;
         self::store($s, 'Checks', count($this->services));
     }
 }
开发者ID:gpichurov,项目名称:ittalents_season5,代码行数:21,代码来源:Administration.php

示例13: addClient

 public function addClient(Client $client)
 {
     return $this->storage->execute('INSERT INTO client(id,secret,name,redirect_url,user_id,description) VALUES ("' . $client->getId() . '" , "' . $client->getSecret() . '" ,"' . $client->getName() . '" ,"' . $client->getRedirectUrl() . '" ,"' . $client->getUserId() . '","' . $client->getDescription() . '")');
 }
开发者ID:nguereza-tony,项目名称:oauth2,代码行数:4,代码来源:Server.php

示例14: Order

?>
			<input type="submit" value="Complete" onClick="setCompleted()">
			<?php 
//}
?>
			<hr>
			<table>
				<tr><td style="width:200px;">Order Code</td>
					<td style="width:200px;">Title</td>
					<td style="width:200px;">Client</td>
					<td style="width:200px;">Destination</td>
					<td style="width:200px;">Action</td>
				</tr>
				<?php 
for ($i = 0; $i < sizeof($orderList); $i++) {
    $mOrder = new Order($orderList[$i]);
    $mClient = new Client($mOrder->getClient());
    echo "<tr>";
    echo "<td><a href='../order/detail.php?id=" . $mOrder->getId() . "'>" . $mOrder->getCode() . "</a></td>";
    echo "<td>" . $mOrder->getTitle() . "</td>";
    echo "<td><a href='../client/detail.php?id=" . $mClient->getId() . "'>" . $mClient->getName() . "</a></td>";
    echo "<td>" . $mOrder->getDestination() . "</td>";
    echo "<td><input type='submit' value='Assign'><input type='submit' value='Track'></td>";
    echo "</tr>";
}
?>
			</table>
		<div>
	</div>
	
</body> 
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:detail.php

示例15: Client

?>
	</div>
	<div id="container">
		<div id="sidebar" style="float:left;width:15%;">
		<?php 
include 'sidebar.php';
?>
		</div>
		<div id="content" style="float:right;width:85%;">
			Add Order
			<form action="action.php?action=add" method="POST">
			<table>
				<tr><td>Title</td><td><input type="text" name="title" id="title"></td></tr>
				<tr><td>Client</td>
					<td><select name="client" id="client"><option> --- Select Client --- </option>
					<?php 
for ($i = 0; $i < sizeof($mClientList); $i++) {
    $mClient = new Client($mClientList[$i]);
    echo "<option value=" . $mClientList[$i] . ">" . $mClient->getName() . "</option>";
}
?>
					</select></td></tr>
				<tr><td>Destination</td><td><textarea name="destination" id="destination" ></textarea></td></tr>
				<tr><td>Description</td><td><textarea name="description" id="description" ></textarea></td></tr>
				<tr><td><input type="submit" value="Add Order"></td></tr>
			</table>
			</form>
		<div>
	</div>
	
</body> 
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:edit.php


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