调用其他类的方法,该如何处理

WBOY
Release: 2016-06-13 10:14:43
Original
1144 people have browsed it

调用其他类的方法
假设一个php文件一个类,那要继承其他类,就必须先include这个php文件,但我看一些框架没有写include就能直接对其他类实例化对象,这是怎么做到的?
我只知道有个__autoload,还有其他的吗?都是怎么运作的?
还是隐藏了include?怎么隐藏的?

------解决方案--------------------
A类想要继承B类,不一定要包含到本文件啊。可能C文件中就已包含了B类和A类
------解决方案--------------------

探讨

A类想要继承B类,不一定要包含到本文件啊。可能C文件中就已包含了B类和A类
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template