Are Magento Object propertyNames that are prefixed by “_” different from ones that aren't?

magento.stackexchange https://magento.stackexchange.com/questions/265886

문제

what does this tell me ? Is there a place in the devdoc's I wasn't able to find or is this a convention I don't know about? thanx for your help...

도움이 되었습니까?

해결책

Magento 2 follows the PSR-2 coding standard, which states:

4.2

Property names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility.

4.3

Method names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top