We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class App { private $rootPath; } class Load { public static function register(App $app) { self::$namespaceMap = [ 'Framework' => $app->rootPath ]; } } 这里的app->rootPath 是私有的,应该只有App类内部可以使用
The text was updated successfully, but these errors were encountered:
/** * 魔法函数__get * * @param string $name 属性名称 * @return mixed */ public function __get($name = '') { return $this->$name; } /** * 魔法函数__set * * @param string $name 属性名称 * @param mixed $value 属性值 * @return mixed */ public function __set($name = '', $value = '') { $this->$name = $value; }
魔术方法控制了的
Sorry, something went wrong.
No branches or pull requests
class App
{
private $rootPath;
}
class Load
{
public static function register(App $app)
{
self::$namespaceMap = [
'Framework' => $app->rootPath
];
}
}
这里的app->rootPath 是私有的,应该只有App类内部可以使用
The text was updated successfully, but these errors were encountered: