ZendFramework   #2           2010 3
                                 Room7H




                     Twig
                ...
#phpstudy_91




                     @wozozo




ZendFramework   #2                            2
#phpstudy_91




                      DF
                     PHP


ZendFramework   #2                        3
#phpstudy_91




                      #phpstudy
                     #phpstudy_91


ZendFramework   #2                   ...
#phpstudy_91




ZendFramework   #2                  5
#phpstudy_91




                                                  188cm
                                  var_export
    ...
#phpstudy_91




                Zend Framework
        ✴ Ver 1.6.3

        ✴                        ...

        ✴




Z...
#phpstudy_91




                Zend Framework
        ✴ ZF             cakePHP



        ✴ Interface Abstract

        ...
#phpstudy_91




                         �
                     �




ZendFramework   #2                          9
#phpstudy_91




ZendFramework   #2                  10
#phpstudy_91




ZendFramework   #2                  11
#phpstudy_91




          JARO       Twitter




ZendFramework   #2                            12
#phpstudy_91




       ✓ Twgi
       ✓ Twig
       ✓ Twig        Zend Framework

       ✓




ZendFramework   #2         ...
#phpstudy_91




ZendFramework   #2                  14
#phpstudy_91




                     <(_ _)>


ZendFramework   #2                            15
#phpstudy_91




            Zend Framework



ZendFramework   #2                          16
#phpstudy_91




                Twig



ZendFramework    #2                   17
#phpstudy_91




                     Twig



ZendFramework   #2                         18
#phpstudy_91




   Twig




ZendFramework   #2                  19
Twig                                     #phpstudy_91




                               Twig
                Smarty Flexy...
#phpstudy_91




                             10/02/22




                     0.9.6 DEV          0.9.5




ZendFramework...
#phpstudy_91




                     Archive      zip

                     Git   Github

                      Subversio...
#phpstudy_91




                               new BSD


                 BSD UNIX                        4.3 BSD Net/2
 ...
#phpstudy_91




ZendFramework   #2                  24
Twig                                #phpstudy_91




                             Twig
                ✓ PHP5.2.4
        ...
Twig                                #phpstudy_91




                             Twig
                ✓ PHP5.2.4
        ...
Twig                           #phpstudy_91




                ✓

                       {% %}


                Twig   {...
Twig                         #phpstudy_91




                ✓




            {% %}    {{ }}



ZendFramework   #2      ...
Twig                                #phpstudy_91




                             Twig
                ✓ PHP5.2.4
        ...
Twig                                #phpstudy_91




                             Twig
                ✓ PHP5.2.4
        ...
Twig                                                        #phpstudy_91




                ✓




            •
         ...
Twig                                                #phpstudy_91




                ✓




                     •

       ...
Twig                   #phpstudy_91




                Twig




ZendFramework   #2                    33
#phpstudy_91




   Twig




ZendFramework   #2                  34
Twig                          #phpstudy_91




           Twig      Loader




ZendFramework   #2                         ...
Twig                                          #phpstudy_91




                     Twig     Loader
                      ...
Twig                                 #phpstudy_91




                Twig_Loader_String




ZendFramework   #2           ...
Twig                          #phpstudy_91




         Twig_Loader_Filesystem

                     HTML




ZendFramewor...
Twig                                #phpstudy_91




                Twig_Loader_Array




ZendFramework   #2             ...
Twig                                          #phpstudy_91




                ZF

                     Twig_Loader_Filesy...
Twig                              #phpstudy_91




                BASIC API USAGE




ZendFramework   #2                 ...
#phpstudy_91




BASIC API USAGE




                                 42
Twig                     #phpstudy_91




       BASIC API USAGE




        spl_autoloader

                             ...
#phpstudy_91




Loader


                        44
#phpstudy_91




Twig


                      45
#phpstudy_91




               46
#phpstudy_91




               47
#phpstudy_91




HTML




                      48
Twig                 #phpstudy_91




ZendFramework   #2                  49
#phpstudy_91




   Zend Framework




ZendFramework   #2                  50
Zend Framework             #phpstudy_91




            ✓ View
            ✓ Extension
            ✓ ViewHelper




ZendFr...
Zend Framework        #phpstudy_91




ZendFramework    #2                  52
Zend Framework                             #phpstudy_91




                      View

                      Zend_View_Ab...
Zend Framework                          #phpstudy_91




                      Nully_View_Twig




ZendFramework    #2    ...
Zend Framework                          #phpstudy_91




                      Nully_View_Twig




ZendFramework    #2    ...
Zend Framework                          #phpstudy_91




                      Nully_View_Twig




ZendFramework    #2    ...
Zend Framework                                #phpstudy_91




                      Extension

                 Twig_Exte...
Zend Framework                          #phpstudy_91




                 Nully_View_Extension




ZendFramework     #2   ...
Zend Framework                     #phpstudy_91




                      getFilters




ZendFramework    #2              ...
Zend Framework                                  #phpstudy_91




                       Bootstrap
            ✴ Nully_View...
Zend Framework                    #phpstudy_91




                      Bootstrap




ZendFramework    #2                ...
#phpstudy_91




ZendFramework   #2                  62
#phpstudy_91




ZendFramework   #2                  63
#phpstudy_91




      ViewHelper     Twig_Token




ZendFramework   #2                               64
Twig                                                #phpstudy_91




                ✓




                     •

       ...
#phpstudy_91




      ViewHelper     Twig_Token




ZendFramework   #2                               66
#phpstudy_91




                 Token
      ✓ Token
      ✓ Twig_TokenParser
      ✓ Twig_Node




ZendFramework   #2   ...
#phpstudy_91




                     Token

       {% helper             [   [   [ ...]]] %}


           zfh viewhelper ...
#phpstudy_91




       Nully_View_TokenParser

            •   getTag()   Token

            •   parse()
                ...
#phpstudy_91




            parse
                Twig_Parser




                      Helper

       Twig_Node


ZendFr...
#phpstudy_91




                Nully_View_Node

        •   __construct Helper

        •   compile()




ZendFramework ...
#phpstudy_91




        compile
                Helper


                 Twig_Compiler::write()
                 ViewHel...
#phpstudy_91




       Token

              Nully_Twig_Extension
           getTokenParsers()



ZendFramework   #2      ...
#phpstudy_91




                 getTokenParsers()




ZendFramework   #2                                  74
#phpstudy_91




                   Token Parser
                Github



          http://github.com/Nully/zf_twig


Zen...
#phpstudy_91




      •   Twig      Smarty


      •   Zend Framework          Twig_Loader_Filesystem        View


     ...
#phpstudy_91




       •             PHP




ZendFramework   #2                        77
#phpstudy_91




        •   Twitter        @Nully

        •   mixi      3800656                        Nully

        • ...
Upcoming SlideShare
Loading in …5
×

初めてのTwig+ZendFramework

3,182 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,182
On SlideShare
0
From Embeds
0
Number of Embeds
101
Actions
Shares
0
Downloads
23
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

初めてのTwig+ZendFramework

  1. 1. ZendFramework #2 2010 3 Room7H Twig + Zend Framework
  2. 2. #phpstudy_91 @wozozo ZendFramework #2 2
  3. 3. #phpstudy_91 DF PHP ZendFramework #2 3
  4. 4. #phpstudy_91 #phpstudy #phpstudy_91 ZendFramework #2 4
  5. 5. #phpstudy_91 ZendFramework #2 5
  6. 6. #phpstudy_91 188cm var_export PHPer http://blog.nully.org/ ZendFramework #2 6
  7. 7. #phpstudy_91 Zend Framework ✴ Ver 1.6.3 ✴ ... ✴ ZendFramework #2 7
  8. 8. #phpstudy_91 Zend Framework ✴ ZF cakePHP ✴ Interface Abstract ✴ ZF ZF ZendFramework #2 8
  9. 9. #phpstudy_91 � � ZendFramework #2 9
  10. 10. #phpstudy_91 ZendFramework #2 10
  11. 11. #phpstudy_91 ZendFramework #2 11
  12. 12. #phpstudy_91 JARO Twitter ZendFramework #2 12
  13. 13. #phpstudy_91 ✓ Twgi ✓ Twig ✓ Twig Zend Framework ✓ ZendFramework #2 13
  14. 14. #phpstudy_91 ZendFramework #2 14
  15. 15. #phpstudy_91 <(_ _)> ZendFramework #2 15
  16. 16. #phpstudy_91 Zend Framework ZendFramework #2 16
  17. 17. #phpstudy_91 Twig ZendFramework #2 17
  18. 18. #phpstudy_91 Twig ZendFramework #2 18
  19. 19. #phpstudy_91 Twig ZendFramework #2 19
  20. 20. Twig #phpstudy_91 Twig Smarty Flexy Symfony ZendFramework #2 20
  21. 21. #phpstudy_91 10/02/22 0.9.6 DEV 0.9.5 ZendFramework #2 21
  22. 22. #phpstudy_91 Archive zip Git Github Subversion PEAR ZendFramework #2 22
  23. 23. #phpstudy_91 new BSD BSD UNIX 4.3 BSD Net/2 BSD UNIX FreeBSD NetBSD ※ README.markdown ZendFramework #2 23
  24. 24. #phpstudy_91 ZendFramework #2 24
  25. 25. Twig #phpstudy_91 Twig ✓ PHP5.2.4 ✓ ✓ ✓ PHP ZendFramework #2 25
  26. 26. Twig #phpstudy_91 Twig ✓ PHP5.2.4 ✓ ✓ ✓ PHP ZendFramework #2 26
  27. 27. Twig #phpstudy_91 ✓ {% %} Twig {{ }} ZendFramework #2 27
  28. 28. Twig #phpstudy_91 ✓ {% %} {{ }} ZendFramework #2 28
  29. 29. Twig #phpstudy_91 Twig ✓ PHP5.2.4 ✓ ✓ ✓ PHP ZendFramework #2 29
  30. 30. Twig #phpstudy_91 Twig ✓ PHP5.2.4 ✓ ✓ ✓ PHP ZendFramework #2 30
  31. 31. Twig #phpstudy_91 ✓ • YYYY/mm/dd {{ time|date }} → 2010/03/06 ZendFramework #2 31
  32. 32. Twig #phpstudy_91 ✓ • {% if name == ‘nully’ %} {% endif %} ZendFramework #2 32
  33. 33. Twig #phpstudy_91 Twig ZendFramework #2 33
  34. 34. #phpstudy_91 Twig ZendFramework #2 34
  35. 35. Twig #phpstudy_91 Twig Loader ZendFramework #2 35
  36. 36. Twig #phpstudy_91 Twig Loader Twig_Loader_String Twig_Loader_Filesystem Twig_Loader_Array ZendFramework #2 36
  37. 37. Twig #phpstudy_91 Twig_Loader_String ZendFramework #2 37
  38. 38. Twig #phpstudy_91 Twig_Loader_Filesystem HTML ZendFramework #2 38
  39. 39. Twig #phpstudy_91 Twig_Loader_Array ZendFramework #2 39
  40. 40. Twig #phpstudy_91 ZF Twig_Loader_Filesystem ZendFramework #2 40
  41. 41. Twig #phpstudy_91 BASIC API USAGE ZendFramework #2 41
  42. 42. #phpstudy_91 BASIC API USAGE 42
  43. 43. Twig #phpstudy_91 BASIC API USAGE spl_autoloader 43
  44. 44. #phpstudy_91 Loader 44
  45. 45. #phpstudy_91 Twig 45
  46. 46. #phpstudy_91 46
  47. 47. #phpstudy_91 47
  48. 48. #phpstudy_91 HTML 48
  49. 49. Twig #phpstudy_91 ZendFramework #2 49
  50. 50. #phpstudy_91 Zend Framework ZendFramework #2 50
  51. 51. Zend Framework #phpstudy_91 ✓ View ✓ Extension ✓ ViewHelper ZendFramework #2 51
  52. 52. Zend Framework #phpstudy_91 ZendFramework #2 52
  53. 53. Zend Framework #phpstudy_91 View Zend_View_Abstract ZendFramework #2 53
  54. 54. Zend Framework #phpstudy_91 Nully_View_Twig ZendFramework #2 54
  55. 55. Zend Framework #phpstudy_91 Nully_View_Twig ZendFramework #2 55
  56. 56. Zend Framework #phpstudy_91 Nully_View_Twig ZendFramework #2 56
  57. 57. Zend Framework #phpstudy_91 Extension Twig_Extension Extension ZendFramework #2 57
  58. 58. Zend Framework #phpstudy_91 Nully_View_Extension ZendFramework #2 58
  59. 59. Zend Framework #phpstudy_91 getFilters ZendFramework #2 59
  60. 60. Zend Framework #phpstudy_91 Bootstrap ✴ Nully_View_Twig Extension ✴ ViewRenderer Nully_View_Twig ✴ View suffix ZendFramework #2 60
  61. 61. Zend Framework #phpstudy_91 Bootstrap ZendFramework #2 61
  62. 62. #phpstudy_91 ZendFramework #2 62
  63. 63. #phpstudy_91 ZendFramework #2 63
  64. 64. #phpstudy_91 ViewHelper Twig_Token ZendFramework #2 64
  65. 65. Twig #phpstudy_91 ✓ • {% if name == ‘nully’ %} {% endif %} ZendFramework #2 65
  66. 66. #phpstudy_91 ViewHelper Twig_Token ZendFramework #2 66
  67. 67. #phpstudy_91 Token ✓ Token ✓ Twig_TokenParser ✓ Twig_Node ZendFramework #2 67
  68. 68. #phpstudy_91 Token {% helper [ [ [ ...]]] %} zfh viewhelper OK ZendFramework #2 68
  69. 69. #phpstudy_91 Nully_View_TokenParser • getTag() Token • parse() Token ZendFramework #2 69
  70. 70. #phpstudy_91 parse Twig_Parser Helper Twig_Node ZendFramework #2 70
  71. 71. #phpstudy_91 Nully_View_Node • __construct Helper • compile() ZendFramework #2 71
  72. 72. #phpstudy_91 compile Helper Twig_Compiler::write() ViewHelper Zend_Controller_Action_HelperBroker ::getStaticHelper(“viewRenderer”) ZendFramework #2 72
  73. 73. #phpstudy_91 Token Nully_Twig_Extension getTokenParsers() ZendFramework #2 73
  74. 74. #phpstudy_91 getTokenParsers() ZendFramework #2 74
  75. 75. #phpstudy_91 Token Parser Github http://github.com/Nully/zf_twig ZendFramework #2 75
  76. 76. #phpstudy_91 • Twig Smarty • Zend Framework Twig_Loader_Filesystem View • Filter Token ViewHelper • ViewHelper Twig_TokenParser Twig_Node • Twig_TokenParser Twig_Node ZendFramework #2 76
  77. 77. #phpstudy_91 • PHP ZendFramework #2 77
  78. 78. #phpstudy_91 • Twitter @Nully • mixi 3800656 Nully • google buzz http://www.google.com/profiles/nully.nl CC BY 2.0 ✴ http://www.flickr.com/photos/jakecaptive/ ✴ http://www.flickr.com/photos/themacguy2k/ ✴ http://www.flickr.com/photos/aplumb/ ZendFramework #2 78

×