本文整理汇总了PHP中Skill::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Skill::getAll方法的具体用法?PHP Skill::getAll怎么用?PHP Skill::getAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill::getAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_addData_skillCheck
function test_addData_skillCheck()
{
Initial::addData();
$skill = Skill::getAll();
$result = new Skill("Acrobatics", "Balancing and tumbling", 1);
$this->assertEquals($skill[0], $result);
}
示例2: find
static function find($search_id)
{
$found_skill = null;
$skills = Skill::getAll();
foreach ($skills as $skill) {
$skill_id = $skill->getId();
if ($skill_id == $search_id) {
$found_skill = $skill;
}
}
return $found_skill;
}
示例3: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Acrobatics";
$description = "stuff";
$test_class = new Skill($name, $description);
$test_class->save();
$name2 = "Athletics";
$description2 = "other stuff";
$test_class2 = new Skill($name2, $description2);
$test_class2->save();
//Act
Skill::deleteAll();
$result = Skill::getAll();
//Assert
$this->assertEquals([], $result);
}
示例4: User
<?php
include "../inc/cookie.php";
include "../model/User.php";
include "../model/Skill.php";
include "../model/Identity.php";
$User = new User();
$Skill = new Skill();
$Identity = new Identity();
$resultUser = $User->getSingle();
$getUserID = $User->getSingle();
$resultSkill = $Skill->getAllForUser();
$selectSkill = $Skill->getAll();
$resultIdentity = $Identity->getAllForUser();
?>
<div class="row">
<div class="col-md-12">
<h2 class="caps">edit your profile</h2>
</div>
</div>
<div class="row">
<div class="col-md-6 col-centered ">
<div class="panel panel-default">
<div class="panel-body" >
<h4 class="caps">
<?php
while ($User = $resultUser->fetch_object()) {
?>
<input type="hidden" id="ID" value="<?php
echo $User->ID;
?>