คำถามติดแท็ก naming-convention

4
Magento 2 แนวปฏิบัติที่ดีที่สุดสำหรับสถานที่เรียนและชื่อ
ในMagento 1เราถูกใช้เพื่อวางชั้นเรียนของเราในไดเรกทอรีเหล่านี้ บล็อก ผู้ช่วย แบบ ทรัพยากร และใช้ชื่อคลาสแบบง่าย ๆ โดยไม่มีอักษรตัวใหญ่อยู่กลางชื่อ ถ้าเรามาดูบางกรณีใน Magento 2 Core ผู้ช่วย ที่ตั้ง : - \Foo\Bar\Helper ชื่อ : - *.php ตัวอย่าง : - \Magento\ImportExport\Helper\Report -\Magento\Cms\Helper\Wysiwyg\Images ผู้สังเกตการณ์ ที่ตั้ง : - \Foo\Bar\Observer ชื่อ : - *.php - *Observer.php ตัวอย่าง : - \Magento\CustomerCustomAttributes\Observer\SalesOrderAddressAfterLoad -\Magento\CustomerBalance\Observer\ProcessBeforeOrderPlaceObserver ปลั๊กอิน ที่อยู่ : - \Foo\Bar\Plugin ชื่อ : …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.