当前位置: 首页>>代码示例>>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;未经允许,请勿转载。