【发布时间】:2012-02-07 15:56:08
【问题描述】:
是否有从类中检索所有属性的函数/方法?比如下面我班级的所有属性:
class plantOfTheMonth {
//Declare which centre(s) are being used
private $centre = "";
//Declare the attributes of the current Plant Of The Month
private $name = "";
private $latinName = "";
private $image = "";
private $imageAlt = "";
private $imageLink = "";
private $strapLine = "";
private $description = "";
private $color = "";
private $centres = "";
//Declare variables for error handling
private $issue = "";
private $issueCode = "";
}
【问题讨论】:
标签: php oop class attributes