Vendor: Zend-Technologies 200-530 Zend PHP 5.3 Certification
Let's take over the world with Zend Framework
-
Upload
ibuildings -
Category
Technology
-
view
106 -
download
1
description
Transcript of Let's take over the world with Zend Framework
![Page 1: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/1.jpg)
Dutch PHP Conference 2011Martin de Keijzer
Let’s take over the world with Zend Framework
Monday, 23 May 2011
![Page 2: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/2.jpg)
Introduction
2Monday, 23 May 2011
![Page 3: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/3.jpg)
Introduction
Martin de Keijzer
Software engineer at IbuildingsBoard member of PHPBeneluxPHP 5 Zend Certified Engineer
Twitter: Martin1982Joind.in: http://joind.in/3253Blog: www.martindekeijzer.nl
3Monday, 23 May 2011
![Page 4: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/4.jpg)
DISCLAIMER
DISCLAIMER: ALL EXAMPLE CODE IS WRITTEN IN THE CONTROLLER BY
EXAMPLE! USE MODELS!!!!
4Monday, 23 May 2011
![Page 5: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/5.jpg)
Monday, 23 May 2011
![Page 6: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/6.jpg)
The case
6
What do we need to take over the world?
Monday, 23 May 2011
![Page 7: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/7.jpg)
The case
✓Location (Country and region)
✓Language
✓Date and time
✓Currency
✓Measuring
7Monday, 23 May 2011
![Page 8: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/8.jpg)
“Location! Location! Location!”Quote from Achmed (2009)
8Monday, 23 May 2011
![Page 9: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/9.jpg)
Zend Locale
Monday, 23 May 2011
![Page 10: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/10.jpg)
A locale defines a country (territory) and a language to bind the various localized information to it.
Zend Locale
10Monday, 23 May 2011
![Page 11: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/11.jpg)
Zend Locale
nl_NL
de_BE
fr_BE
nl_BE
11Monday, 23 May 2011
![Page 12: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/12.jpg)
CLDRCommon Locale Data Repository
http://cldr.unicode.org
Zend Locale
12Monday, 23 May 2011
![Page 13: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/13.jpg)
Zend Locale
13Monday, 23 May 2011
![Page 14: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/14.jpg)
Zend Locale
The current locale is is: nlThe browser's locale is is: nlThe environment's locale is is: de_DEThe set locale is is: en_US
14Monday, 23 May 2011
![Page 15: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/15.jpg)
Zend Locale
15Monday, 23 May 2011
![Page 16: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/16.jpg)
Zend Locale
16Monday, 23 May 2011
![Page 17: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/17.jpg)
Zend Locale
17
In FR people speak fr
Monday, 23 May 2011
![Page 18: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/18.jpg)
Zend Locale
18
In FR people speak fr. In France people speak French.
Monday, 23 May 2011
![Page 19: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/19.jpg)
Zend Locale
19Monday, 23 May 2011
![Page 20: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/20.jpg)
Zend Locale
20Monday, 23 May 2011
![Page 21: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/21.jpg)
Zend Locale
array(6) { ["yes"]=> string(2) "ja" ["no"]=> string(3) "nee"}
21Monday, 23 May 2011
![Page 22: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/22.jpg)
Zend Locale
["yesarray"]=> array(2) { [0]=>string(2) "ja" [1]=>string(1) "j" } ["noarray"]=> array(2) { [0]=>string(3) "nee" [1]=>string(1) "n" }
22Monday, 23 May 2011
![Page 23: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/23.jpg)
Zend Locale
["yesexpr"]=> string(20) "^([jJ][aA]?)|([jJ]?)" ["noexpr"]=> string(26) "^([nN]([eE][eE])?)|([nN]?)"
23Monday, 23 May 2011
![Page 24: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/24.jpg)
Zend Locale
A list of supported locales:
http://framework.zend.com/manual/en/zend.locale.appendix.html
24Monday, 23 May 2011
![Page 25: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/25.jpg)
Zend Locale
Utilized by:
Zend_Controller_RouterZend_CurrencyZend_DateZend_FilterZend_MeasureZend_Service_TechnoratiZend_TimesyncZend_TranslateZend_Validate
25Monday, 23 May 2011
![Page 26: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/26.jpg)
Speaking the languageZend_Translate
26Monday, 23 May 2011
![Page 27: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/27.jpg)
Zend Translate
Operates using adapters:Array
Csv
Gettext
Tbx
Tmx
Qt
Xliff
Xmltm
27Monday, 23 May 2011
![Page 28: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/28.jpg)
Zend Translate
28Monday, 23 May 2011
![Page 29: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/29.jpg)
Zend Translate
29Monday, 23 May 2011
![Page 30: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/30.jpg)
Zend Translate
30
nl.php
fr.php
Monday, 23 May 2011
![Page 31: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/31.jpg)
Zend Translate
31
my-view.phtml
Monday, 23 May 2011
![Page 32: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/32.jpg)
Zend Locale
32Monday, 23 May 2011
![Page 33: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/33.jpg)
Zend Locale
Quick hint: Google uses locales too!Zend Framework is your gateway to more power!
33Monday, 23 May 2011
![Page 34: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/34.jpg)
Monday, 23 May 2011
![Page 35: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/35.jpg)
Do not get lost in timeZend_Date
35Monday, 23 May 2011
![Page 36: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/36.jpg)
Zend Date
The date is May 2, 2011 9:13:41 PM. The date is 2 mei 2011 21:13:41.
36Monday, 23 May 2011
![Page 37: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/37.jpg)
Zend Timesync
37
2 mai 2011 21:25:09
Monday, 23 May 2011
![Page 38: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/38.jpg)
Zend_Locale revisited
38
You can use Zend_Locale_Format to overridedate and number formatting.
I never had any use for it though.....
Monday, 23 May 2011
![Page 39: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/39.jpg)
Show me the money!Zend_Currency
39Monday, 23 May 2011
![Page 40: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/40.jpg)
Zend Currency
40Monday, 23 May 2011
![Page 41: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/41.jpg)
Zend Currency
In the Netherlands you pay with Euro (€).And in the UK you pay with British Pound
Sterling (£).
41Monday, 23 May 2011
![Page 42: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/42.jpg)
Zend Currency
42Monday, 23 May 2011
![Page 43: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/43.jpg)
Zend Currency
43
Please hand me 10.00 US Dollar for food and
shelter.
Monday, 23 May 2011
![Page 44: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/44.jpg)
Zend Currency
44
Got lost in locales?getCurrencyList()getRegionList()
getLocale()
Monday, 23 May 2011
![Page 45: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/45.jpg)
Never trust a user!Zend_Validate
45Monday, 23 May 2011
![Page 46: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/46.jpg)
Zend Validate
46Monday, 23 May 2011
![Page 47: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/47.jpg)
Zend Validate
47Monday, 23 May 2011
![Page 48: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/48.jpg)
Measures please?Zend_Measure
48Monday, 23 May 2011
![Page 49: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/49.jpg)
Zend Measure
49Monday, 23 May 2011
![Page 50: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/50.jpg)
Zend Measure
50
A Big Mac’s weight is 200,05 g in the Netherlands.
In the USA this would be 0.441034755500847600236309 lbs
Monday, 23 May 2011
![Page 51: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/51.jpg)
Zend Measure
Zend_Measure doesn’t utilize locales to give you the correct units, but only the correct number
formats.
51Monday, 23 May 2011
![Page 52: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/52.jpg)
Conclusion
52Monday, 23 May 2011
![Page 53: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/53.jpg)
Image sources
Achmed http://barenakedislam.wordpress.com/2011/01/27/sweden-muslim-offended-by-ahmed-the-dead-terrorist-demands-compensation-for-mental-anguish/jeff-dunham_achmed/
Clocks http://blogs.manageengine.com/image/501000000062207/timezones.jpg
Cat http://icanhascheezburger.com
Pinky & the brain http://blogg.visir.is/purplemagic/category/truarbrogð/
Zend Framework logo http://www.myskills.be/
Sneaking in: http://fakeposters.com
53Monday, 23 May 2011
![Page 54: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/54.jpg)
Questions ?
54Monday, 23 May 2011
![Page 55: Let's take over the world with Zend Framework](https://reader034.fdocuments.us/reader034/viewer/2022042814/54c8e5584a79595e2f8b45b6/html5/thumbnails/55.jpg)
Thank you!
Contact details:
Twitter: @Martin1982Blog: http://www.martindekeijzer.nl
Please give feedback on Joind.in!http://joind.in/3253
Monday, 23 May 2011