小编lev*_*el0的帖子

哪个gradle文件用于将应用程序设置为可调试?

我是android开发的新手.我刚刚开始设置我的设备来调试我的应用程序.在浏览android开发工具时,它说buildTypes debuggable在build.gradle文件中设置为true.我不确定使用gradle.build(Module)或gradle.build(project)的哪个成绩文件?

android build.gradle android-gradle-plugin

12
推荐指数
1
解决办法
1万
查看次数

PHP中的可见性?继承时`$ this`的上下文?

我是php新手,我正在浏览文档以获取可见性.我对文档中的这个例子感到困惑.当拨打电话时$myFoo->test(),不应该打电话给Foos $this->testPrivate();.我的意思是不$this应该Foo是对象而不是Bar对象?.根据我的知识(我可能在这里错了)Foo将有一些自己test()继承的方法,Bar并且调用$myFoo->test()将调用'$ this-> testPrivate',其中$this应该是Foos对象myFoo.那么它是如何调用BartestPrivate方法?

class Bar 
{
public function test() {
    $this->testPrivate();
    $this->testPublic();
}

public function testPublic() {
    echo "Bar::testPublic\n";
}

private function testPrivate() {
    echo "Bar::testPrivate\n";
}
}

class Foo extends Bar 
{
public function testPublic() {
    echo "Foo::testPublic\n";
}

private function testPrivate() {
    echo "Foo::testPrivate\n";
}
}

$myFoo = …
Run Code Online (Sandbox Code Playgroud)

php inheritance class-visibility

1
推荐指数
1
解决办法
72
查看次数