比如有一个controller 类如下:
class Controller_Base extends Yaf_Controller_Abstract {
public function fail($message, $errno) {.....}
}
现在我要在我自己在library目录新建的一个类里面调用这个fail方法,我用 new 的方法总提示如下错误:
Warning: Yaf_Controller_Abstract::__construct() expects at least 3 parameters, 0 given in ...
这种错误,请问该怎么办呢?
构造对象时需要传入3个参数 new (p1,p2,p3) 具体看下源码