Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Doctrine ORMでValue Objectを扱う方法4選 #phpstudy / 4 ...

Doctrine ORMでValue Objectを扱う方法4選 #phpstudy / 4 ways to handle Value Objects with Doctrine ORM

PHP勉強会@東京 2024年3月LT

Hiromi Hishida

March 27, 2024
Tweet

More Decks by Hiromi Hishida

Other Decks in Programming

Transcript

  1. 7BMVF0CKFDUWT&OUJUZ w ݟͨ໨͸͔ͳΓࣅͯΔ w *%Ͱ൑ผ͠ͳ͍ w ͨͱ͑͹1SJDFͰ͸ΓΜ͝ͷԁ ͱΈ͔Μͷԁ͸ಉ͡΋ͷʹͳ Δ w

    ͨͱ͑͹1FSJPEͰ͸։࢝೔࣌ͱऴ ྃ೔͕࣌Ұகͨ͠Β"͞Μͷۈ຿ ࣌ؒͱ#͞Μͷۈ຿࣌ؒͰ΋ಉ͡ ΋ͷʹͳΔ
  2. ํ๏4NBSUHFUUFS w ΦϨΦϨ໋໊ͳͷͰͲ͔͜ͷԿ͔ͱ͔ͿͬͯͨΒ εϛϚηϯ w 7BMVF0CKFDUͷ஋͸௨ৗͷΧϥϜͱͯ͠όϥͯ͠ ࣋ͪɺHFUUFSͰ7BMVF0CKFDUΛ࡞Δ w QSPT w

    ૉ๿Ͱཧղ͠΍͍͢ʢ%PDUSJOFͷػೳʹৄ͘͠ ͳ͍ਓͰ΋ཧղ͠΍͍͢ʣ w DPOT w HFUUFSΛखಈͰॻ͘ඞཁ͕͋Δ
  3. ํ๏$VTUPN5ZQFT w 7BMVF0CKFDUΛ$VTUPN5ZQFʹ͢Δʢ%PDUSJOF03.ͷػೳΛ࢖ ͏ʣ w ղઆهࣄIUUQTUFDIRVBSUFUDPNDPKQ EPDUSJOFDVTUPNNBQQJOHUZQF w QSPT w

    (FUUFSΛखಈͰॻ͔ͳͯ͘ྑ͍ w 7BMVF0CKFDUଆʹ%PDUSJOF03.͕࿙Εग़ͳ͍ w $VTUPN5ZQFΛ࠶ར༻Ͱ͖Δ w DPOT w ΧϥϜʹೖΔ஋ʹ͢Δͷ͕खؒʢ%#.4ଆʹͳ͍ΧϥϜλΠ ϓͷ৔߹ʣ