interface IPillage
{
function emptyBakAccount();
function burnDocument();
}
class Executive extends Employee implements IPillage
{
private $totalStockOptions;
function emptyBankAccount()
{
echo "Call CFO and ask to transfer funds to Swiss bank account.";
}
function burnDocuments()
{
echo "Torch the office suite.";
}
}
class Assistant extends Employee implements IPillage
{
function takeMome()
{
echo "Taking memo...";
}
function emptyBankAccount()
{
echo "Go on shopping spree with office credit card.";
}
function burnDocuments()
{
echo "Start small fire in the trash can.";
}
}
<?php
interface IEmployee{...}
interface IDeveloper{...}
interface IPillage{...}
class Employee implements IEmployee,IDeveloper,iPillage {
...
}
class Contractor implements IEmployee,IDeveloper {
...
}
?>
<?php
/**
* 声明接口Demo
* @author wzy
*
*/
interface Demo
{
const NAME = "wangzhengyi";
const AGE = 25;
function fun1 (); // 声明方法默认是public abstract
function fun2 ();
}
/**
* 声明接口的继承Demo2
*
* @author wzy
*
*/
interface Demo2 extends Demo
{
function fun3 ();
function fun4 ();
}
/**
* 声明接口Demo3
*
* @author wzy
*
*/
interface Demo3
{
function fun5 ();
function fun6 ();
}
/**
* 声明父类ParentClass
*
* @author wzy
*
*/
class ParentClass
{
function fun7 ();
}
/**
* 子类必须实现接口中所有的方法
*
* @author wzy
*
*/
class ChildClass extends ParentClass implements Demo2, Demo3
{
function fun1 ();
function fun2 ();
function fun3 ();
function fun4 ();
function fun5 ();
function fun6 ();
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有