Home  >  Article  >  Backend Development  >  discuz声明类难道还有另类的方法吗

discuz声明类难道还有另类的方法吗

WBOY
WBOYOriginal
2016-06-23 13:48:46846browse

研究discuz发现:其中它有一个C类
即然是C类,那么肯定要事先声明创建的,而php的创建类的方式,我学习php只有一个办法,那就是 class C{ };
可是我搜了一下这个字样class C{ 根本就没有,查了下百度,有人说这个是创建C类的代码:

C::creatapp();class core{	private static $_tables;	private static $_imports;	private static $_app;	private static $_memory;	public static function app() {		return self::$_app;	}	public static function creatapp() {		if(!is_object(self::$_app)) {			self::$_app = discuz_application::instance();		}		return self::$_app;	}


但,这里面哪有class C{字样呢,难道我学的php创建类的知识不对吗,我晕,!


回复讨论(解决方案)

你没看到 class C extends core {} 这样的代码吗?

/source/class/class_core.php
文件最下面不是有句这个么...
class C extends core {}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn