當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Department::getAll方法代碼示例

本文整理匯總了PHP中Department::getAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Department::getAll方法的具體用法?PHP Department::getAll怎麽用?PHP Department::getAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Department的用法示例。


在下文中一共展示了Department::getAll方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testSave

 function testSave()
 {
     //Arrange
     $name = "Math";
     $id = 1;
     $test_department = new Department($name, $id);
     $test_department->save();
     //Act
     $result = Department::getAll();
     //Assert
     $this->assertEquals($test_department, $result[0]);
 }
開發者ID:jlbethel,項目名稱:Registrar_test,代碼行數:12,代碼來源:DepartmentTest.php

示例2: find

 static function find($search_id)
 {
     $found_department = null;
     $department = Department::getAll();
     foreach ($department as $department) {
         $department_id = $department->getId();
         if ($department_id == $search_id) {
             $found_department = $department;
         }
     }
     return $found_department;
 }
開發者ID:jlbethel,項目名稱:Registrar_test,代碼行數:12,代碼來源:Department.php

示例3: find

 static function find($search_id)
 {
     $found_department = null;
     $all_deps = Department::getAll();
     foreach ($all_deps as $dep) {
         if ($dep->getId() == $search_id) {
             $found_department = $dep;
         }
     }
     return $found_department;
 }
開發者ID:ashlinaronin,項目名稱:back2school_fam,代碼行數:11,代碼來源:Department.php

示例4: setCharSet

require_once $root_path . 'include/care_api_classes/class_department.php';
require_once $root_path . 'include/inc_config_color.php';
// load color preferences
$breakfile = 'nursing.php?sid=' . $sid . '&lang=' . $lang;
if ($pday == '') {
    $pday = date('d');
}
if ($pmonth == '') {
    $pmonth = date('m');
}
if ($pyear == '') {
    $pyear = date('Y');
}
$t_date = $pday . '.' . $pmonth . '.' . $pyear;
$dept_obj = new Department();
$deptarray = $dept_obj->getAll();
$depttypes = $dept_obj->getTypes();
$dept = $dept_obj->getDeptAllInfo($dept_nr);
while (list($x, $v) = each($dept)) {
    ${$x} = $v;
}
$dept_info = $dept_obj->getTypeInfo($dept['type']);
?>


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
<HTML>
<HEAD>
<?php 
echo setCharSet();
?>
開發者ID:patmark,項目名稱:care2x-tz,代碼行數:31,代碼來源:dept_new_show.php

示例5: test_delete

 function test_delete()
 {
     //Arrange
     $name = "Biology";
     $address = "346 Stupid Avenue";
     $test_department = new Department($name, $address);
     $test_department->save();
     $name2 = "Chemiology";
     $address2 = "55 Bo Ct";
     $test_department2 = new Department($name2, $address2);
     $test_department2->save();
     //Act
     $test_department->delete();
     //Assert
     $result = Department::getAll();
     $this->assertEquals([$test_department2], $result);
 }
開發者ID:ashlinaronin,項目名稱:back2school_fam,代碼行數:17,代碼來源:DepartmentTest.php

示例6: basename

* elpidio@care2x.org, 
*
* See the file "copy_notice.txt" for the licence notice
*/
$thisfile = basename($_SERVER['PHP_SELF']);
if (!isset($mode)) {
    $mode = 'show';
} elseif ($mode == 'create' || $mode == 'update') {
}
$lang_tables = array('departments.php');
require './include/init_show.php';
if ($parent_admit) {
    $sql = "SELECT dr.*, e.encounter_class_nr FROM care_encounter AS e, care_person AS p, care_encounter_diagnostics_report AS dr \n\t\tWHERE p.pid=" . $_SESSION['sess_pid'] . " \n\t\t\tAND p.pid=e.pid \n\t\t\tAND e.encounter_nr=" . $_SESSION['sess_en'] . " \n\t\t\tAND e.encounter_nr=dr.encounter_nr \n\t\tORDER BY dr.create_time DESC";
} else {
    $sql = "SELECT dr.*, e.encounter_class_nr FROM care_encounter AS e, care_person AS p, care_encounter_diagnostics_report AS dr \n\t\tWHERE p.pid=" . $_SESSION['sess_pid'] . " AND p.pid=e.pid AND e.encounter_nr=dr.encounter_nr \n\t\tORDER BY dr.create_time DESC";
}
if ($result = $db->Execute($sql)) {
    $rows = $result->RecordCount();
    include_once $root_path . 'include/care_api_classes/class_department.php';
    $dept_obj = new Department();
    $depts_array =& $dept_obj->getAll();
} else {
    echo $sql;
}
$subtitle = $LDDiagXResults;
$notestype = 'diagnostics';
$_SESSION['sess_file_return'] = $thisfile;
$buffer = str_replace('~tag~', $title . ' ' . $name_last, $LDNoRecordFor);
$norecordyet = str_replace('~obj~', strtolower($subtitle), $buffer);
/* Load GUI page */
require './gui_bridge/default/gui_show.php';
開發者ID:patmark,項目名稱:care2x-tz,代碼行數:31,代碼來源:show_radiology.php


注:本文中的Department::getAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。