Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction of Thinreports for PHP
Search
Katsuya Hidaka
June 27, 2015
Technology
0
6.4k
Introduction of Thinreports for PHP
PHP カンファレンス 2015 福岡で、Thinreports の PHP 実装を作ったよという話をしたときのスライド
Katsuya Hidaka
June 27, 2015
Tweet
Share
More Decks by Katsuya Hidaka
See All by Katsuya Hidaka
後方互換の保ち方 / How to Maintain Compatibility
hidakatsuya
0
820
HTML帳票 / Frontend Study Group in Sannin 3rd
hidakatsuya
0
3.2k
2006-2016 Ruby, OSS, Thinreports/matsue-rubykaigi08-LT
hidakatsuya
0
440
prpr でプルリクエスト運用を自動化する /Introduction-of-prpr
hidakatsuya
0
3.5k
AgileJapan2016 Shimane Session2-2
hidakatsuya
0
2.1k
Other Decks in Technology
See All in Technology
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
190
Platform Engineering for Software Developers and Architects
syntasso
1
520
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
910
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
AIチャットボット開発への生成AI活用
ryomrt
0
170
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
強いチームと開発生産性
onk
PRO
35
11k
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
Featured
See All Featured
It's Worth the Effort
3n
183
27k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Become a Pro
speakerdeck
PRO
25
5k
Designing for humans not robots
tammielis
250
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Thoughts on Productivity
jonyablonski
67
4.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Transcript
ؔ٦فٝا٦أז䌘牰 خ٦ٕ⡲ת׃կ PHP Conference FUKUOKA 2015
ߴ ࠀ Ruby, PHP Thinreports ͷ։ൃऀ
SIɾσʔληϯλʔɾӡ༻ɾσʔλΤϯτϦʔ
αϚϦʔ Thinreports ͍ͬͯ͏Φʔϓϯιʔεͷாථπʔ ϧ͕͢Ͱʹ͋ͬͯɺͦͷPHP൛Λ࡞ͬͨΑɺͱ ͍͏ɻ
Thinreports ͱ • Ruby Ͱ͑ΔΦʔϓϯιʔεͷாථπʔϧ • ϨΠΞτσβΠφʢEditorʣͱ PDFग़ྗϥΠϒϥϦʢGeneratorʣ • Ҏ߱ɺͪ͜ΒΛʮຊՈʯͱݺͼ·͢
None
None
None
Editor Layout File (.tlf) Script (Generator)
PHP ൛ Thinreports • Ҏલ͔Βཁଟ • Generator ͷ PHP ࣮
• Editor ڞ௨
Editor Layout File (.tlf) Script (Generator) ࠓճ࡞ͬͨͷίί
thinreports-php • Status: dev-master • PHP >= 5.6 PHP7, HHVM
ಈ࡞ະ֬ೝ • The MIT License ճΓͰͬͯΔ TCPDF LGPLv3 Ͱ͋Δ͜ͱʹҙ • Pure PHP
None
None
Hello thinreports-php
Setup. Install thinreports-php $ vi composer.json : “require”: { “thinreports-php/thinreports-php”:
“dev-master” } : $ composer install
Setup. Install Editor
1. Create a layout file ID Λ “world”
2. Write code use Thinreports; $report = new Thinreports\Report('hello_world.tlf'); $page
= $report->addPage(); $page->item('world')->setValue('World'); // ҎԼͷΑ͏ʹॻ͚Δ: // $page(‘world’)->setValue(’World’); // $page->setItemValue(‘world’, ’World’); // $page->setItemValues([‘world’ => ’World’]); $report->generate('hello_world.pdf');
3. Run $ php hello_world.php ↩︎
4. Finish
ͦͷଞͰ͖Δ͜ͱ • ͪΖΜຊޠ OK • ը૾ͷ੩త/ಈతషΓ͚ • ਤܗɾςΩετͷಈతͳελΠϧมߋ • ϖʔδ൪߸ͷࣗಈදࣔ
• ؆қॻࣜઃఆʢ࣌ࠁɺɺࣈ٧Ίʣ ͳͲͳͲɻৄࡉຊՈެࣜαΠτΛͲ͏ͧɻ
ͱ͍͑ɺ·ͩ։ൃόʔδϣϯ • ϦετπʔϧະରԠ • ෳ߹ϨΠΞτະରԠ ൺֱత؆୯ʹͰ͖Δɻ͜ͷޙʹͰରԠ͢Δ • ϑΥϯτͷϑΥʔϧόοΫະରԠ ͜Ε͕ຯʹҰ൪ͷ՝ •
ύϑΥʔϚϯεɾϝϞϦʔফඅͷվળ IPAϑΥϯτΛ TCPDF ༻ʹม͢Δίετ͕ߴ͍ɻࣄલʹม͢ΔΈ༻ҙ • ςετίʔυͷΧόϨοδ 70% ͙Β͍ ؒʹ߹Θͣ
TCPDF • ςετίʔυ͕ͳ͍ ࠷ۙؾ͍ͮͨ… • ࠨԼʹখ͘͞ʮPowered by TCPDFʯ ۃখαΠζˍനʹനจࣈͳͷͰݟͨͳ͍͕…
• PDF ϥΠϒϥϦ։ൃͱ͍͏ҋʹखΛग़͔͢ ΜͰΔͱ͜Ζ
ࠓޙ
։ൃํ • ຊՈ Thinreports ͱผͷίϛϡχςΟͱͯ͠։ൃ ͪΖΜࢲࢀՃ͠·͢ • ϨΠΞτϑΝΠϧͷ༷ԼهͰެ։͞Ε͍ͯΔ ͷͰ͜Εʹैͬͯै͢Δײ͡ https://github.com/thinreports/thinreports/wiki/Spec:-Layout-File
• ͱ͍͑ɺPHP൛ಠࣗͷػೳશવ͋Γ ͢Ͱʹ Ruby ࣮ͱएׯ API ҧ͍·͢͠
ͥͻҰॹʹ • ݱࡏͷ։ൃϝϯόʔ: 1ਓʢࢲʣ • ͔͠ PHP ΛͪΌΜͱΔͷ 5 ͿΓ
PHPΧϯϑΝϨϯεͳͷʹ͍͢·ͤΜ • ΠέͯΔπʔϧʹͳΔ͔Ͳ͏͔ɺΈͳ͞Μ ʹ͔͔͍ͬͯ·͢!
ૣɺ։ൃʹࢀՃ͢Δ • ·ͩԿߟ͑ͯͳ͍Ͱ͢ • ͱΓ͑͋͑ͣɺGitter ͷ “dev” room ʹ JOIN
README.md ͷԼͷํʹ͋Δɹɹɹɹɹɹɹ ɹΛΫϦοΫ͢Δ͠ • ։ൃυΩϡϝϯτͳΜ͔ Wiki ʹ·ͱΊ·͢ গʑ͓ͪԼ͍͞ • Α͘Θ͔Βͳ͍Αɺͱ͍͏ํޙͰฉ͍ͯͩ͘ ͍͞
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ ͪͳΈʹɺ • ຊՈ Thinreports v1.0 ϦϦʔε༧ఆ • ΧελϜϑΥϯτ ݱࡏ͑ΔϑΥϯτ
4 ͭͷΈɻಠࣗϑΥϯτ͕ར༻ՄೳʹͳΔ͔ • Ϧετπʔϧͷվળ ୯ථϨΠΞτͱ࿈ථϨΠΞτ͕બՄೳʹͳΔ͔ • όʔίʔυػೳͷωΠςΟϒαϙʔτͳͲ