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

object-mapperを作ってる話

 object-mapperを作ってる話

80b7d87c10fcdb6a0cba4f8b69e933bc?s=128

polidog

June 18, 2020
Tweet

Transcript

  1. object-mapperΛ ࡞ͬͯΔ࿩ @polidog shizuoka.php online #0 2020/06/18

  2. ࣗݾ঺հ • @polidog • PartyHard Inc. • PHPϓϩάϥϚ

  3. #ϙϦΊΔ

  4. helicon/object-mapper https://github.com/helicon-php/object-mapper

  5. object-mapperͱ͸ • ഑ྻ͔ΒΦϒδΣΫτʹม׵͢ΔͨΊͷπʔ ϧ • @varͷ৘ใΛ΋ͱʹϚοϐϯά͢Δ • PHP7.3·Ͱ͔͠ରԠͯ͠ͳ͍

  6. None
  7. 2ͭͷϥΠϒϥϦ • object-type-parser • type-converter

  8. object-type-parser • PHPͷΫϥεͷϓϩύςΟ͔Βํͷ৘ใΛऔ ಘ͢Δ • ഑ྻͱͯ͠ܕ৘ใΛදݱ͢Δ

  9. None
  10. type-converter • εΩʔϚʹͦͬͯ஋ͷܕΛมߋ͢Δ • ༷ʑͳܕʹରԠͰ͖ΔΑ͏ͳػߏ

  11. None
  12. ॲཧͷྲྀΕ ΫϥεϓϩύςΟͷ ܕ৘ใղੳ ஋ͷܕม׵ ΦϒδΣΫτ΁ͷ Ϛοϐϯά object-type-parser type-converter Laminas\Hydrator (ReflectionHydrator)

  13. ࣮૷ίʔυ͸͜Ε͚ͩ https://github.com/helicon-php/object-mapper/blob/master/src/ObjectMapper.php

  14. ࣮૷͢Δ্Ͱ৺͕͍ͯΔ͜ͱ • ͱʹ͔͘γϯϓϧʹͭ͘Δ • ϞδϡʔϧͷڥքΛҙࣝ͢Δ • ػೳ͝ͱʹύοέʔδԽ͠࠶ར༻ੑΛߴΊΔ

  15. ࠓޙͷల๬ • ύϑΥʔϚϯε໘ͷݟ௚͠ • PHP7.4ରԠ • ࠷ऴతʹ͸ORM࡞Γ͍ͨ

  16. ࠷ޙʹ

  17. ͥͻ࢖ͬͯΈ͍ͯͩ͘͞

  18. ࢖͍ํ https://kojirooooocks.hatenablog.com/entry/ 2019/11/05/021319 @kojirock5260

  19. ͦͯ͠ϑΟʔυόοΫ ͍ͩ͘͞ (GithubͰελʔ΋…)

  20. ͓͠·͍ɻ