📄 class.student.php
字号:
<?phpclass Student { private $_id; private $_name; public $courses; public function __construct($id, $name) { $this->_id = $id; $this->_name = $name; $this->courses = new CourseCollection(); $this->courses->setLoadCallback('_loadCourses', $this); } public function getName() { return $this->_name; } public function getID() { return $this->_id; } private function _loadCourses(Collection $col) { $arCourses = StudentFactory::getCoursesForStudent($this->_id, $col); } public function __toString() { return $this->_name; }}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -