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
PSR规范中貌似没有提到这一点
class Foo { private $bar; public function bar() { return $this->bar; } public function getBar() { return $this->bar; } }
对于这样的类,似乎也没有强制性规定如何获取私有属性,获取属性的方法名要不要带get
同事调侃是时候区分.Net和Java程序员了
The text was updated successfully, but these errors were encountered:
抱歉,现在才看到。PSR是比较“正规”的标准,所以不会省略get,我在这里列举的是我在别的语言中常用的一些经验,无论这些细节是什么,指导思想不是“正规”,而是让程序员写起来更加自然、简洁。
Sorry, something went wrong.
No branches or pull requests
PSR规范中貌似没有提到这一点
对于这样的类,似乎也没有强制性规定如何获取私有属性,获取属性的方法名要不要带get
同事调侃是时候区分.Net和Java程序员了
The text was updated successfully, but these errors were encountered: