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


PHP client::getAll方法代码示例

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


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

示例1: find

 static function find($search_id)
 {
     $found_client = null;
     $clients = client::getAll();
     foreach (clients as $client) {
         $id = $client->getId();
         if ($id == $search_id) {
             $found_client = $client;
         }
     }
     return $found_client;
 }
开发者ID:jschold,项目名称:Hair_Salon,代码行数:12,代码来源:Client.php

示例2: test_save

 function test_save()
 {
     //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 = client::getAll();
     //Assert
     $this->assertEquals($test_client, $result[0]);
 }
开发者ID:bdspen,项目名称:hair_salon,代码行数:16,代码来源:ClientTest.php

示例3: test_getAll

 function test_getAll()
 {
     $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();
     $client_name2 = "Katie";
     $stylist_id = $test_stylist->getId();
     $test_client2 = new Client($id, $client_name, $stylist_id);
     $test_client2->save();
     $result = client::getAll();
     $this->assertEquals([$test_client, $test_client2], $result);
     $result = Client::getAll();
     $this->assertEquals([$test_client, $test_client2], $result);
 }
开发者ID:jschold,项目名称:Hair_Salon,代码行数:19,代码来源:ClientTest.php

示例4: test_deleteClient

 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

示例5:

<?php

include 'template/blankStart.php';
include_once '../model/profiles/client.php';
$clients = client::getAll();
?>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"> </h3>
            </div>
            <div class="panel-body">
                <?php 
$index = 1;
foreach ($clients as $client) {
    echo "<a href=\"client_info.php?client={$client['name']}\"> {$index}.{$client['name']}</a><br>";
    $index++;
}
?>
            </div>
        </div>
    </div>
</div>


<?php 
include 'template/blankEnd.php';
开发者ID:n-sakib,项目名称:juierp,代码行数:28,代码来源:clients.php


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