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
650
HTML帳票 / Frontend Study Group in Sannin 3rd
hidakatsuya
0
3.1k
2006-2016 Ruby, OSS, Thinreports/matsue-rubykaigi08-LT
hidakatsuya
0
360
prpr でプルリクエスト運用を自動化する /Introduction-of-prpr
hidakatsuya
0
3.4k
AgileJapan2016 Shimane Session2-2
hidakatsuya
0
2.1k
Other Decks in Technology
See All in Technology
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs (QCon London)
inesmontani
PRO
0
150
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
3
1.8k
AWS を使う上で知っておきたいオンプレミス知識/aws-on-premise-essentials
emiki
1
4.1k
Databricks:『生成AI World Cup』のご案内
databricksjapan
1
130
4年前、あるじゃん老害エンジニアLT合戦に登壇、米国西海岸コンピュータ歴史博物館体験記の続編
toshi_atsumi
0
190
〜小さく始めて大きく育てる〜データ分析基盤の開発から活用まで
kniino
0
2k
o11y入門_外形監視を利用したWebアプリケーションへの最適なモニタリング_TechBrew
k5k
2
100
Postman v10リリース後を振り返る
nagix
0
120
A (short) History of AI
harishpillay
0
110
カオナビの利用実績をアウトカムへつなげる旅 / example-of-data-management-startup-in-kaonavi
kaonavi
0
110
Databricks におけるデータエンジニアリング
databricksjapan
0
370
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
0
290
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
How GitHub (no longer) Works
holman
304
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
15
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
319
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
Designing Experiences People Love
moore
135
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
990
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
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 ͭͷΈɻಠࣗϑΥϯτ͕ར༻ՄೳʹͳΔ͔ • Ϧετπʔϧͷվળ ୯ථϨΠΞτͱ࿈ථϨΠΞτ͕બՄೳʹͳΔ͔ • όʔίʔυػೳͷωΠςΟϒαϙʔτͳͲ