moodle中的“$cm->course”是什么意思?
What is the meaning of "$cm->course" in moodle?
我是 PHP 的新人,目前我正在研究 moodle LMS 工具。
我指的是 scorm 包的 view.php,但不知道为什么 $cm->course
这用于 php。
请帮忙。
提前致谢
看看here
“->”表示访问$cm
对象属性course
$cm是对象,course是变量。在这里你可以看到对象的 PHP 语法简介:
http://php.net/manual/en/language.types.object.php
PHP has two Object Operator namely -> and ::
-> is used when you are trying to call a method on an Instance and / or access an Instance property.
:: is used when you want to call a static method or call a parent
class's version of a method within a child class.
参考:https://www.codeproject.com/questions/196270/what-is-meant-by-symbol-in-php
注意:我用谷歌搜索了你的确切问题并得到了这个结果!
是"object operator" - T_OBJECT_OPERATOR。它用于访问对象上 class 的属性和方法。
我是 PHP 的新人,目前我正在研究 moodle LMS 工具。
我指的是 scorm 包的 view.php,但不知道为什么 $cm->course
这用于 php。
请帮忙。
提前致谢
看看here
“->”表示访问$cm
对象属性course
$cm是对象,course是变量。在这里你可以看到对象的 PHP 语法简介: http://php.net/manual/en/language.types.object.php
PHP has two Object Operator namely -> and ::
-> is used when you are trying to call a method on an Instance and / or access an Instance property.
:: is used when you want to call a static method or call a parent class's version of a method within a child class.
参考:https://www.codeproject.com/questions/196270/what-is-meant-by-symbol-in-php
注意:我用谷歌搜索了你的确切问题并得到了这个结果!
是"object operator" - T_OBJECT_OPERATOR。它用于访问对象上 class 的属性和方法。