标签:抽象方法 使用 表示 math cte set 需要 操作符 employee
封装,继承,多态
class ClaaName
{
//属性声明
//方法声明
}
class Employee
{
private $name;
private $title;
protected $wage;
protected function clockIn() {
echo "";
}
protected function clockOut() {
echo "";
}
}
function __set($propName, $propValue)
{
$this->$propName = $propValue;
}
class Employee
{
private $name;
public function getName()
{
return $this->name;
}
public function setName($name)
{
$this->name = $name;
}
}
class mathFunctions
{
const PI = ‘3.14‘;
const E = ‘2.72‘;
}
echo mathFunctions::PI;
abstract class Employee
{
abstract function hire();
abstract function fire();
abstract function promote();
abstract demoote();
}
标签:抽象方法 使用 表示 math cte set 需要 操作符 employee
原文地址:https://www.cnblogs.com/person3/p/9259725.html