本文整理汇总了PHP中Client::getClientName方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getClientName方法的具体用法?PHP Client::getClientName怎么用?PHP Client::getClientName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client::getClientName方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Client
function test_getClientName()
{
//Arrange
$client_name = "Ted";
$stylist_id = 1;
$test_client = new Client($client_name, $stylist_id);
//Act
$result = $test_client->getClientName();
//Assert
$this->assertEquals($client_name, $result);
}
示例2: Client
function test_setClientName()
{
$client_name = "Bob Rails";
$id = 3;
$email = "bobrails82@gmail.com";
$stylist_id = null;
$test_client = new Client($client_name, $id, $email, $stylist_id);
$test_client->setClientName("Terra Code");
$result = $test_client->getClientName();
$this->assertEquals("Terra Code", $result);
}
示例3: Stylist
function test_update()
{
$name = "Megan";
$id = null;
$test_stylist = new Stylist($name, $id);
$test_stylist->save();
$client_name = "Shawnee";
$stylist_id = $test_stylist->getId();
$test_client = new Client($id, $client_name, $stylist_id);
$test_client->save();
$new_client_name = "Katie Saccomanno";
$test_client->update($new_client_name);
$this->assertEquals("Katie Saccomanno", $test_client->getClientName());
}
示例4: Stylist
function test_getClientName()
{
//Arrange
$stylist_name = "Donna";
$id = null;
$test_stylist = new Stylist($stylist_name, $id);
$test_stylist->save();
$client_name = "Robin";
$stylist_id = $test_stylist->getId();
$test_client = new Client($client_name, $stylist_id);
$test_client->save();
//Act
$result = $test_client->getClientName();
//Assert
$this->assertEquals($client_name, $result);
}
示例5: editClient
/**
* Modify a client saved in the database.
*
* @param Client $client
* @return integer
*/
public function editClient(Client $client)
{
$mcrypt = new MCrypt();
$sql = "UPDATE client \n\t\t\tSET id_client = '" . $client->getIdClient() . "', client_name = '" . replaceCharacters($client->getClientName()) . "', agent = '" . replaceCharacters($client->getAgent()) . "', address = '" . replaceCharacters($client->getAddress()) . "', phone = '" . $client->getPhone() . "', email = '" . $client->getEmail() . "', website = '" . $client->getWebsite() . "', user = '" . $client->getUser() . "', password = '" . $mcrypt->encrypt($client->getPassword()) . "' WHERE id_client = '" . $client->getIdClient() . "'";
return DB::query($sql);
}
示例6: Stylist
function test_update()
{
//Arrange
$stylist_name = "gary";
$id = null;
$test_stylist = new Stylist($stylist_name, $id);
$test_stylist->save();
$client_name = "jerry";
$stylist_id = $test_stylist->getId();
$test_client = new Client($client_name, $id, $stylist_id);
$test_client->save();
$new_name = "larry";
//Act
$test_client->update($new_name);
//Assert
$this->assertEquals("larry", $test_client->getClientName());
}
示例7: Stylist
function test_updateClientName()
{
//arrange
$stylist_name = "Lisa";
$id = null;
$test_stylist = new Stylist($stylist_name, $id);
$test_stylist->save();
$client_name = "Alfred";
$stylist_id = $test_stylist->getId();
$test_client = new Client($client_name, $id, $stylist_id);
$new_client_name = "Steven";
//act
$test_client->updateClientName($new_client_name);
//assert
$this->assertEquals("Steven", $test_client->getClientName());
}
示例8: restoreSingleFileAction
/**
* Restore single file + Bacula ACLs
*/
function restoreSingleFileAction()
{
$this->view->title = $this->view->translate->_('Restore Single File');
$this->fileid = $this->_request->getParam('fileid', null);
// get data for form
Zend_Loader::loadClass('Job');
$job = new Job();
$this->view->file = $job->getByFileId($this->fileid);
// do Bacula ACLs
if (empty($this->view->file)) {
$this->render();
return;
}
Zend_Loader::loadClass('Client');
$clients = new Client();
/*
* Restore options form
*/
Zend_Loader::loadClass('FormRestoreOptions');
$form = new formRestoreOptions();
$form->setDecorators(array(array('ViewScript', array('viewScript' => 'decorators/formRestoreoptions.phtml', 'form' => $form))));
$form->init();
$form->setAction($this->view->baseUrl . '/restorejob/run-restore-single-file');
$form->setActionCancel($this->view->baseUrl);
// fill form
$form->populate(array('fileid' => $this->fileid, 'client_name' => $clients->getClientName($this->view->file[0]['jobid'])));
$this->view->form = $form;
$this->render();
}
示例9: Client
function test_update()
{
//Arrange
$client_name = "Paco";
$id = null;
$stylist_id = 2;
$test_client = new Client($client_name, $id, $stylist_id);
$test_client->save();
$new_client_name = "Pablo";
//Act
$test_client->update($new_client_name);
//Assert
$this->assertEquals("Pablo", $test_client->getClientName());
}
示例10: render
/**
* Renderize the view.
*
* @return null
*/
public function render(Client $client)
{
?>
<!-- JQUERY UI -->
<link type="text/css" rel="stylesheet" href="<?php
echo APP_PATH;
?>
/css/jquery-ui.min.css">
<link type="text/css" rel="stylesheet" href="<?php
echo APP_PATH;
?>
/css/jquery-ui.theme.min.css">
<script type="text/javascript" src="<?php
echo APP_PATH;
?>
/js/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function(){
$("#date_suscription").datepicker({dateFormat: "yy-mm-dd"});
});
</script>
<p>
<?php
echo REQUIRED_FIELDS_TEXT;
?>
</p>
<form action="<?php
echo $this->generateURL('client', 'edit', $client->getIdClient());
?>
" method="post">
<fieldset>
<div class="row">
<div class="col-md-6">
<div>
<label for="category">
Categoría <small>(*)</small>
</label>
<select name="category" required>
<option value="">
Seleccionar
</option>
<?php
if ($client->getCategory() === "Socio") {
?>
<option value="Socio" selected>
Socio
</option>
<option value="Suscriptor">
Suscriptor
</option>
<?php
} else {
if ($client->getCategory() === "Suscriptor") {
?>
<option value="Socio">
Socio
</option>
<option value="Suscriptor" selected>
Suscriptor
</option>
<?php
} else {
?>
<option value="Socio">
Socio
</option>
<option value="Suscriptor">
Suscriptor
</option>
<?php
}
}
?>
</select>
</div>
<div>
<label for="client_name">
Nombre <small>(*)</small>
</label>
<input name="client_name" type="text" required value="<?php
echo $client->getClientName();
?>
" />
</div>
//.........这里部分代码省略.........
示例11: render
/**
* Renderize the view.
*
* @return null
*/
public function render(Client $client)
{
?>
<p>
<?php
echo REQUIRED_FIELDS_TEXT;
?>
</p>
<form action="<?php
echo $this->generateURL('client', 'edit', $client->getIdClient());
?>
" method="post">
<fieldset>
<div class="row">
<div class="col-md-6">
<div>
<label for="client_name">
Nombre <small>(*)</small>
</label>
<input name="client_name" type="text" required value="<?php
echo $client->getClientName();
?>
" />
</div>
<div>
<label for="agent">
Representante <small>(*)</small>
</label>
<input name="agent" type="text" required value="<?php
echo $client->getAgent();
?>
" />
</div>
<div>
<label for="address">
Dirección <small>(*)</small>
</label>
<input name="address" type="text" required value="<?php
echo $client->getAddress();
?>
" />
</div>
<div>
<label for="phone">
Teléfono <small>(*)</small>
</label>
<input name="phone" type="tel" required value="<?php
echo $client->getPhone();
?>
" />
</div>
</div>
<div class="col-md-6">
<div>
<label for="email">
Correo electrónico <small>(*)</small>
</label>
<input name="email" type="email" required value="<?php
echo $client->getEmail();
?>
" />
</div>
<div>
<label for="website">
Sitio web
</label>
<input name="website" type="url" value="<?php
echo $client->getWebsite();
?>
" />
</div>
<div>
<label for="user">
Usuario <small>(*)</small>
</label>
<input name="user" type="text" required value="<?php
echo $client->getUser();
?>
" />
</div>
//.........这里部分代码省略.........
示例12: Stylist
function test_update()
{
//Arrange
$stylist_name = "Big Bird";
$id = null;
$test_stylist = new Stylist($stylist_name, $id);
$test_stylist->save();
$client_name = "Harry Potter";
$stylist_id = $test_stylist->getId();
$test_client = new Client($client_name, $stylist_id);
$test_client->save();
$new_name = "Spock";
//Act
$test_client->update($new_name);
//Assert
$this->assertEquals("Spock", $test_client->getClientName());
}