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


PHP Teacher::initialize方法代码示例

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


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

示例1: TeacherRepository

<?php

require_once 'models/teacher.class.php';
require_once 'repository/teacherrepository.class.php';
$repository = new TeacherRepository();
$teacher1 = new Teacher();
$teacher1->initialize(1, "Surendra", "Shakya", "surendrashakya@gmail.com", "Pulchowk", 23423432);
$repository->add($teacher1);
$teacher2 = new Teacher();
$teacher2->initialize(2, "Sajan", "Thapa", "thapasajan@gmail.com", "Bhaktapur", 3242342);
$repository->add($teacher2);
$teacher3 = new Teacher();
$teacher3->initialize(3, "Rajiv", "Shah", "rajivshah@gmail.com", "Satdobato", 32432423);
$repository->add($teacher3);
include_once 'includes/formvalidation.php';
?>

<?php 
include_once 'includes/header.php';
?>
		<tr>
			<th colspan="7" class="text-center">Teacher Info<button class="btn btn-xs btn-primary pull-right" data-toggle="modal" data-target="#add_teacher"><span class="glyphicon glyphicon-plus"></span></button></th>
		</tr>
		<tr>
			<th><input type="checkbox" id="select_all"/></th>
			<th>Id</th>
			<th>Full Name</th>
			<th>Email</th>
			<th>Address</th>
			<th>Contact</th>
			<th>Action</th>
开发者ID:shrsujan,项目名称:leapfrog,代码行数:31,代码来源:teacher.php

示例2: Teacher

<?php

require_once "models/teacher.class.php";
require_once "repository/teacherrepository.class.php";
?>

<?php 
$teacher1 = new Teacher();
$teacher2 = new Teacher();
$teacher3 = new Teacher();
$teacher4 = new Teacher();
$teacherrepository = new TeacherRepository();
$teacher1->initialize(1, "dixanta", "shrestha", "dixanta@gmail.com", "php");
$teacher2->initialize(2, "ram", "shah", "dixanta@gmail.com", ".net");
$teacher3->initialize(3, "shyam", "malakar", "dixanta@gmail.com", "java");
$teacher4->initialize(4, "hari", "shrestha", "dixanta@gmail.com", "ruby");
$teacherrepository->add_teacher($teacher1);
$teacherrepository->add_teacher($teacher2);
$teacherrepository->add_teacher($teacher3);
$teacherrepository->add_teacher($teacher4);
?>


<?php 
include_once "header.php";
?>

<table class="table table-bordered table-hover table-striped">
	<tr>
		<th><input type="checkbox" name="checkbox" id="checkall"></th>
		<th>ID</th>
开发者ID:pratishshr,项目名称:leapfrog,代码行数:31,代码来源:teacher.php

示例3: Teacher

<?php

if (isset($_POST['add'])) {
    $teacher = new Teacher();
    $teacher->initialize($_POST['id'], $_POST['first_name'], $_POST['last_name'], $_POST['email'], $_POST['address'], $_POST['contact'], $_POST['course']);
    $repository->add($teacher);
}
开发者ID:shrsujan,项目名称:leapfrog,代码行数:7,代码来源:formvalidation.php


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