SlideShare a Scribd company logo
Symfony2
  Tomohiro Mitsumune
• Tomohiro Mitsumune (a.k.a. Kiske)
•
•                        Jobeet

  • http://d.hatena.ne.jp/Kiske/
Symfony
CLI
php app/console xxxxx
init:bundle

•
•
    •
    • appKernel, autoload
Google
Symfony2Project


• https://github.com/Garfield-fr/
  Symfony2Project
• CLI
php symfony2project generate:project
Blog Company blog
--controller="Blog" --session-start
--session-name="blog"
--orm="doctrine" --assetic
--swiftmailer --doctrine-migration
--doctrine-fixtures
Symfony2Project
•
    • beta2   Doctrine Common 3.0
                   github   master 2.0.x

$ cd vender/doctrine-common
$ git branch -av
$ git checkout -b 3.0.x origin/
3.0.x
assets:install

•                      asset



•                      asset

    • src/Acme/DemoBundle/Resource/public/
router:debug


•
•
router:dump-apache

•                mod_rewrite



•
doctrine:database

• doctrine:database:create
 • config.yml                 database create

• doctrine:database:drop
 •
 • --force                      drop
doctrine:generate:entity
•             Entity

•
•
    • Entity
    • Mapping use
    • mapping-type     yml
php app/console
doctrine:generate:entity
AcmeDemoBundle:User
“name:string(255) email:string(255)
createdAt:datetime”
doctrine:generate:entities
•                  Entity



    • setter/getter
    • repository
•
    • entity   entities
doctrine:schema
• doctrine:schema:create
 • Entity
         DB

• doctrine:schema:drop
 • Entity            drop

• doctrine:schema:update
 • Entity                 DB
CLI
Symfony2
はじめてのSymfony2

More Related Content

はじめてのSymfony2