Symfony2ã§ã®éçºã«ããçšåºŠã®çµéšãããåäŒæ¥ã¯ãéå§ã®ããã®ç¬èªã®æå°éã®ãã¬ãŒã ã¯ãŒã¯ãæã£ãŠããå¯èœæ§ãé«ãã§ãããèšäºã§ã¯ãããªãã¯ãã¡ã€ã³ã«ãããªãã·ã§ã³ã«ã€ããŠèª¬æããŸãã
ãã®èšäºã¯ãSymfony2ãåããŠäœ¿çšããèªè ã察象ãšããŠããŸãã ãããŠããã®ãã¬ãŒã ã¯ãŒã¯ãç©æ¥µçã«äœ¿çšããŠãã人ã ã¯ãã³ã¡ã³ããå ±æãããããé¡ãããŸãã
åãã¢ã«ã€ããŠã次ã®åœ¢åŒã§èª¬æããŸãã
- 圹è·
- 説æ
- èšçœ®
- åºæ¬ãã³ãã«
- ã¹ãã£ã³ã®åé¡ãçºçããŸãã
å 容
- Symfony Standard Edition
- symfonyã³ã³ãã³ã管çãã¬ãŒã ã¯ãŒã¯
- REST API
- Evercodelabã¹ã±ã«ãã³
- ãœãã¿ãµã³ãããã¯ã¹
- Knp radãããžã§ã¯ã
- Symfony2ããã°
Symfony Standard Edition
説æ
Symfony2ã¯ããµã³ãã«ã¢ããªã±ãŒã·ã§ã³ãšããŠSymfony2ã³ãã¥ããã£ã«ãã£ãŠæäŸãããã¢ããªã±ãŒã·ã§ã³ã§ãã ãããã®å Žåã§ããéçºãå¿«é©ãã€è¿ éã«è¡ãã«ã¯ãïŒè¿œæ±ããç®æšã«å¿ããŠïŒãã³ãã«ãæ€çŽ¢ããŠè¿œå ããå¿ èŠããããŸãã ãã¬ãŒã ã¯ãŒã¯ã¯ããã¬ãŒã ã¯ãŒã¯ã®äžæ žã§ããã¢ããªã±ãŒã·ã§ã³ã®æ§é ã«æ £ããããã«é©ããŠããŸãã
äœæ¥ãéå§ã§ããAppBundleãäœæãããŠããŸãïŒãã ãããã³ãã«æ§é ã¯php ./app/console generateïŒbundleã䜿çšããŠç°¡åã«çæã§ããŸãïŒã Twigã¯ãã³ãã¬ãŒããšã³ãžã³ãšããŠäœ¿çšãããŸãïŒå¥ã®ãšã³ãžã³ã«çœ®ãæããããšãã§ããŸãïŒã Swiftmailerã«ãã£ãŠèšå®ãããDoctrine ORM / DBALããã³Doctrine PHPCR-ODMã§äœ¿çšããã泚éãå«ãŸããŸãã
èšçœ®
äœæ²å®¶ | composer create-project symfony / framework-standard-edition my_project_name
|
---|---|
symfony | symfony new my_project_name |
åºæ¬ãã³ãã«
ååãšç°¡åãªèª¬æãå«ãè¡š
ãã¬ãŒã ã¯ãŒã¯ãã³ãã« | æ ç¹
|
---|---|
SensioFrameworkExtraBundle | ã³ã³ãããŒã©ãŒã倧å¹
ã«ç°¡çŽ åã§ããã¢ãããŒã·ã§ã³ãããã€ãè¿œå ããã³ã³ãããŒã©ãŒã®ãã¹ãŠã®ããžãã¯ãã¢ãããŒã·ã§ã³ã«èšé²ãããããã«ããŸãã
|
ãã¯ããªã³ãã³ãã« | æ矩ã®dbalãšormã®ãµããŒã
|
å°ææ | ãã³ãã¬ãŒããšã³ãžã³ãšããã€ãã®æ¡åŒµæ©èœã®ãµããŒã
|
ã»ãã¥ãªãã£ãã³ãã« | æäœã®äžè¬ååã¯ã Symfony2 \ SecurityBundleã®èšäºã§plusegã«åãŸããŠããŸã
|
è³ç£ãã³ãã« | ã³ã³ãããŒã«jsãcssãåçãã¢ã€ã³ã³
|
SensioGeneratorBundle | ã³ãŒããçæããã³ãã³ããè¿œå ããŸã
|
WebProfilerBundle | éçºããã³ãã¹ãç°å¢ã®ãããã°ããã«
|
SensioDistributionBundle | äœæ²å®¶ã®ããã¯ããŠã§ãã³ã³ãã£ã®ã¥ã¬ãŒã¿ãŒãã»ãã¥ãªãã£ãã§ãã«ãŒã éçºããã³ãã¹ãç°å¢ã§äœ¿çšïŒdev / testïŒ
|
ã¹ã€ããã¡ã€ã©ãŒãã³ãã« | æçŽãéãããã®ãµããŒãã©ã€ãã©ãª
|
Monologãã³ãã« | ãã®ã³ã°çšã®Monologã©ã€ãã©ãªã®ãµããŒã
|
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
æ€åºãããŸããã
symfony cmf
説æ
ã¢ã»ã³ããªã®ç®çã¯ãéçºè ãCMSæ©èœãã¢ããªã±ãŒã·ã§ã³ã«ç°¡åã«è¿œå ã§ããããã«ããããšã§ãã æ¢åã®ãã³ãã«ã®éèŠãªååïŒã¹ã±ãŒã©ããªãã£ããŠãŒã¶ããªãã£ãåªããããã¥ã¡ã³ããåªãããã¹ãã«ãã¬ããžã ççµåCMSïŒãã«ãããªã³ã°CMS decoupledcms.org ïŒã®ã¢ã€ãã¢ãå®è£ ãããŠããŸãã
詳现ãªè°è«ã¯ããªã³ã¯ãSymfony CMFã ããŒã2ãšæåŸã® " waitekkã«ãã ã
èšçœ®
äœæ²å®¶ | $ composer create-project symfony-cmf / standard-edition
$ composerã€ã³ã¹ããŒã« |
---|---|
Git | $ git clone gitïŒ//github.com/symfony-cmf/standard-edition.git <path-to-install>
$ cd <ã€ã³ã¹ããŒã«ãããã¹> $ composerã€ã³ã¹ããŒã« |
åºæ¬ãã³ãã«
ååãšç°¡åãªèª¬æãå«ãè¡š
ãããã¯ãã³ãã« | PHPCRãšSonataBlockBundleãçµ±åããŸã
|
---|---|
ã³ã¢ãã³ãã« | ã³ã³ãã³ãã衚瀺ããããã®äžè¬çãªãã«ããŒã¡ãœãããæäŸããŸã
|
ã³ã³ãã³ããã³ãã« | ã³ã³ãã³ããå®çŸ©ããããã®åºæ¬ã¯ã©ã¹ãæäŸããŸããããšãã°ãåããã¥ã¡ã³ãã®åºç€ã¯ãååãæ¬æããããªã±ãŒã·ã§ã³æ
å ±ãããã³PHPCRã®ãããªéå±€æ§é ãç¶æããããã®èŠªããã¥ã¡ã³ããžã®ãªã³ã¯ãå«ãStaticContentã¯ã©ã¹ã§ãã
|
ãã³ãã«ãäœæ | create.jsã®çµ±å-RDFaã¢ãããŒã·ã§ã³ã䜿çšããŠããŒãžãç·šéããããã®æ©èœçãªWebã€ã³ã¿ãŒãã§ãŒã¹ã ã€ãŸãããµã€ãã®ç®¡çéšåã«ç§»åããã«ãå
¬éãããããŒãžã§ããŒãžã®ç¹å®ã®èŠçŽ ãçŽæ¥ç·šéã§ããŸãã
|
ã¡ãã£ã¢ãã³ãã« | åçããã€ããªããã¥ã¡ã³ãïŒpdfãªã©ïŒããã¡ãã£ã¢ãã¡ã€ã«ã®ç®¡çããããªãmp3ã«æŽçã§ããŸãã ããããããã«ã¯è¿œå ã®åªåãå¿
èŠã§ãã ãã³ãã«ã¯ãç»åãšãã¡ã€ã«ã®ã¿ãå¶åŸ¡ããŸãã
|
ã¡ãã¥ãŒãã³ãã« | PHPCRãšKnpMenuBundleãçµ±åããŸã
|
ã«ãŒãã£ã³ã°ãã³ãã« | ã«ãŒã¿ãŒã®æ©èœãæ¡åŒµãããªãã€ã¬ã¯ãçšã®ã³ã³ãããŒã©ãŒãäœæããPHPCRã®ããã¥ã¡ã³ãã®å Žæã«å¿ããŠã«ãŒããäœæã§ããŸãã
|
SearchBundle | ãµã€ãæ€çŽ¢
|
ãœãã³ãã« | SonataSeoBundleã®ã¢ããªã³ãšããŠå®è£
|
SimpleCmsBundle | PHPCRã§ããªãŒãæ§æããã³ã³ãã³ããã«ãŒããã¡ãã¥ãŒé ç®ã衚瀺ã§ããŸã |
SonataDoctrinePhpcrAdminBundle
| SonataAdminBundleãšPHPCRã®çµ±å
|
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
æ€åºãããŸããã
REST API
説æ
ãã¥ãŒããªã¢ã«ã§ã¯ã段éçãªæ§æã瀺ããŠããŸãã
REST APIã®æ§ç¯ã¯ç°¡åã§ã¯ãããŸããã ãã®ã»ã¯ã·ã§ã³ã§ã¯ãREST APIãçµã¿èŸŒãŸãããµã³ãã«ã¢ããªã±ãŒã·ã§ã³ãæäŸããŸãã
ããã°APIã®äŸãå®è£ ãããŠããŸãã ã¯ãšãªããã»ããµãšãã®ã€ã³ã¿ãŒãã§ã€ã¹ã¯åå¥ã®ã¯ã©ã¹ã«é 眮ãããã¢ãã«ã¯Pageãšã³ãã£ãã£ã«ãã£ãŠå®è£ ãããã²ãã¿ãŒãšã»ãã¿ãŒã®ã€ã³ã¿ãŒãã§ã€ã¹ãšããŠæ瀺ãããŸãã ã¯ã©ã¹ã®è²¬ä»»ãåé¢ããããšã§ãããè¯ãã³ãŒããæžãããšãã§ããŸãã
ã»ãã¥ãªãã£ãæ§æããã«ã¯ãè¿œå ã®ã¬ã€ã€ãŒãããšãã°ãOauth2ïŒ HWIOAuthBundle ïŒã䜿çšã§ããããã«ãããã³ãã«ãå¿ èŠã§ãã
LINK / UNLINKã®å®è£ ã¯èŠãã«ããã§ãã
PATCHã¡ãœããã¯ããŸããŸã§ãïŒ ããã€ãã®æšå¥šäºé ïŒã
èšçœ®
äœæ²å®¶ | $ curl -s getcomposer.org/installer | php
$ php composer.phar create-project liuggio / symfony2-rest-api-the-best-2013-way -sdev $ cd blog-rest-symfony2 |
---|---|
Git | Gitã¯ããŒã³github.com/liuggio/symfony2-rest-api-the-best-2013-way.git
|
åºæ¬ãã³ãã«
Symfony Standard Editionã®åœ¢åŒã®ããŒã¹ã«å ããŠ
ååãšç°¡åãªèª¬æãå«ãè¡š
FOSRestBundle | å¿
èŠãªãã¹ãŠã®æ§æã«ãŒãïŒYAMLãŸãã¯XMLïŒãäœæããé©åãªã¡ãœããã«ãããããŸã
|
---|---|
JMSSerializerBundle | jsonãxmlã§å¿çãã·ãªã¢ã«åããããã«å¿
èŠ
|
NelmioApiDocBundle | ã¢ãããŒã·ã§ã³ã®åœ¢åŒã§èšé²ããããã¹ãŠã®APIã¡ãœããã®ããã¥ã¡ã³ãã®çæã
|
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
æ€åºãããŸããã
Evercodelabã¹ã±ã«ãã³
説æ
Evercodeãæºåããã³äœ¿çšããã¢ããªã±ãŒã·ã§ã³ãã¬ãŒã ã¯ãŒã¯ã
æ©èœã®1ã€ã¯ãæ§ææžã¿ã®å±éæ§æãã¡ã€ã«ïŒcapifonyïŒã§ãããå±éã¹ããŒã¿ã¹ãéç¥ããé倧ãªãšã©ãŒãã°ãéä¿¡ããããã®HipChatæ¥ç¶èšå®ããããŸãã
[ ãœãŒã¹ ]
èšçœ®
äœæ²å®¶ | composer.phar create-project evercode / symfony-skeleton path / dev-master |
---|---|
Git | git clone git@github.comïŒEvercodeLab / symfony-skeleton.git path /
|
åºæ¬ãã³ãã«
ååãšç°¡åãªèª¬æãå«ãè¡š
GedmoDoctrineExtensions | Doctrineã®æ©èœãæ¡åŒµããŸãã ããŒã¿ããŒã¹ã§ã¬ã³ãŒããè¿œå ããã³æŽæ°ãããšãã«èªåçã«æ¥ä»ãèšå®ããTimestampableãªã©ã®å¿
èŠãªãã®ãè¿œå ããŸãããŸããããªãŒã§æ©èœããããã®ããªãŒãè¿œå ããŸãã
|
---|---|
DoctrineFixturesBundle | ããŒã¿ããŒã¹ã®ãã£ã¯ã¹ãã£ã䜿çšããŸãã ããçš®ã®ãã¹ãæ
å ±ã絶ããçæããå¿
èŠãããéçºæ®µéã§ã®ç掻ã倧å¹
ã«ç°¡çŽ åããŸãã
|
DoctrineMigrationsBudnle | ããŒã¿ããŒã¹ãšãšã³ãã£ãã£ã®ãããã³ã°ã®éãã«åºã¥ããŠç§»è¡ãçæããŸãã ããããæãå¿
èŠãã€éèŠãªãã³ãã«ã§ããããããªãã§ã¯éçºã¯ã¯ããã«å°é£ã«ãªããŸãã
|
ãã©ã¹ãŠãŒã¶ãŒãã³ãã« | ãŠãŒã¶ãŒãšé£æºããããã®æ©èœã®å®å
šãªã»ãããæäŸããŸãïŒç»é²ãæ¿èªãªã©ãåãããã«ã
|
Sonataadminbundle | ãµã€ãã®ç®¡çéšåãäœæããããã®æ©èœãæäŸããŸãïŒåºæ¬ãã³ãã«ã®äœæãããŒã¿ã®ç·šéãåé€ãããã³ããŸããŸãªè¿œå æ©èœïŒããŒã¿ã®ããŸããŸãªåœ¢åŒãžã®ãšã¯ã¹ããŒããªã©ïŒã ãã®ãã³ãã«èªäœã«ã¯ãã«ã¹ã¿ãã€ãºããã³ããŒãºã«åãããŠã«ã¹ã¿ãã€ãºããããã®éåžžã«æè»ãªãªãã·ã§ã³ããããŸãã
|
KnpMenuBundle | ã¡ãã¥ãŒãåçã«çæããããã®ãã³ãã«ãšã©ã€ãã©ãªã ã«ãŒãããã¹ãšããŠäœ¿çšããŸãã
|
KnpPaginatorBundle | ãµã€ãã®åçãªããŒãžããã²ãŒã·ã§ã³ãäœæããŸãã
|
FOSRestBundle | ãã®ãã³ãã«ã¯ãRESTful APIããã³ã¢ããªã±ãŒã·ã§ã³ã®è¿
éãªéçºã®ããã®ããŒã«ã»ãããæäŸããŸãã
|
Vichuploaderãã³ãã« | ããŠã³ããŒãããã³ããŠã³ããŒããããã¡ã€ã«ã®ãã®åŸã®äœ¿çšã倧å¹
ã«ä¿é²ããŸã
|
| ç»åã®ãã£ãã·ã¥ããµã€ãºå€æŽããã®ä»ã®å¿ èŠãªæäœã åçã®ãã¬ãã¥ãŒã®äœæã«æããã䜿çšãããŸãã |
EvercodePageBundle
| ã³ã³ãã³ãããŒãžãæäœããããã®å°ããªãã³ãã«ã SonataAdminBundleãšé£æºããŠåäœããŸã
|
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
capifonyã䜿çšããå Žåã埮調æŽããå¿ èŠãããå ŽåããããŸãã
- / webãã/ app / cacheãã/ app / logsã«å¯Ÿããæš©å©
- deploy.rbã§useïŒaclãã©ã¡ãŒã¿ãŒã䜿çšããå Žåã¯ãsudo apt-get install aclããã·ã³ã§å®è¡ããŠãããã€ãã\ etc \ fstabã®çŸåšã®ããŒãã£ã·ã§ã³ã«aclãã©ã°ãè¿œå ããå¿ èŠããããŸã
- ããã©ã«ãã§å€ã¯app / config / parameters.yml.distããååŸããããããapp / config / parameters.ymlã®å 容ã远跡ããŸã
ãœãã¿ãµã³ãããã¯ã¹
説æ
ãœãã¿ãããžã§ã¯ããã³ãã«ã®åäœã瀺ãããã«ããã®ãããªWebã¢ããªã±ãŒã·ã§ã³ãäœæãããŸãã-è±å¯ãªæ©èœãåããã¹ãã¢ã§ãã
å€ãã®äžè¬çãªã¿ã¹ã¯ïŒããŒãžã¬ã€ã¢ãŠãã管çããã«ããã®ä»ã®CMSæ©èœã®äœæãã¡ãã£ã¢ãã¡ã€ã«ã®ç®¡çãªã©ïŒã®ãœãªã¥ãŒã·ã§ã³ãå€§å¹ ã«ç°¡çŽ åã§ããŸãããããã¥ã¡ã³ããæ¹åãããå¯èœæ§ããããããå€å€§ãªæéãè²»ããå¿ èŠããããŸãã
èšçœ®
äœæ²å®¶ | $ curl -s getcomposer.org/installer | php
$ php composer.phar create-project sonata-project / sandboxïŒ2.3.x-dev ãŸã㯠$ DATABASE_NAME = sonata DATABASE_USER = root DATABASE_PASSWORD = "" php composer.phar create-project sonata-project / sandboxïŒdev-2.4-develop |
---|---|
ã¢ãŒã«ã€ã | $ curl -L github.com/sonata-project/sandbox-build/archive/2.3.tar.gz | tar xzv
$ cp app / config / parameters.yml.dist app / config / parameters.yml DBæ§æ $ vim app / config / parameters.yml ããŒã¿ã®èªã¿èŸŒã¿ $ php bin / load_data.php |
åºæ¬ãã³ãã«
å€æ°ã®ãã³ãã«ãããã³ãããã®å€ãã¯è£å©ïŒäŸåïŒã§ããããã究極ã®æ©èœãäœæãããšããç¹ã§æãèå³æ·±ããã®ã®ã¿ã玹ä»ããŸãã
ååãšç°¡åãªèª¬æãå«ãè¡š
KnpGaufretteBundle | ãã³ãã«ã¯ããã¡ã€ã«ã·ã¹ãã ã®æœè±¡åã¬ãã«ãæäŸããã¹ãã¬ãŒãžïŒAWSãCloudStorageãªã©ïŒã«é¢ä¿ãªãåããã¡ã€ã«ã«ã¢ã¯ã»ã¹ã§ããããã«ããŸãã åºç€ãšãªããã¡ã€ã«ã·ã¹ãã ãé
ãå Žåã§ãããã¡ã€ã«ã¢ã¯ã»ã¹ããã£ãã·ã¥ã§ããŸãã
|
---|---|
DoctrineFixturesBundle | ããŒã¿ããŒã¹ã®ãã£ã¯ã¹ãã£ã䜿çšããŸãã ããçš®ã®ãã¹ãæ
å ±ã絶ããçæããå¿
èŠãããéçºæ®µéã§ã®ç掻ã倧å¹
ã«ç°¡çŽ åããŸãã
|
DoctrineMigrationsBudnle | ããŒã¿ããŒã¹ãšãšã³ãã£ãã£ã®ãããã³ã°ã®éãã«åºã¥ããŠç§»è¡ãçæããŸãã ããããæãå¿
èŠãã€éèŠãªãã³ãã«ã§ããããããªãã§ã¯éçºã¯ã¯ããã«å°é£ã«ãªããŸãã
|
ãã©ã¹ãŠãŒã¶ãŒãã³ãã« | ãŠãŒã¶ãŒãšé£æºããããã®æ©èœã®å®å
šãªã»ãããæäŸããŸãïŒç»é²ãæ¿èªãªã©ãåãããã«ã
|
ãœãã¿ãŠãŒã¶ãŒãã³ãã« | FOSUserBundleãSonataAdminProjectã«çµ±åããŸã
|
Sonataadminbundle | ãµã€ãã®ç®¡çéšåãäœæããããã®æ©èœãæäŸããŸãïŒåºæ¬ãã³ãã«ã®äœæãããŒã¿ã®ç·šéãåé€ãããã³ããŸããŸãªè¿œå æ©èœïŒããŒã¿ã®ããŸããŸãªåœ¢åŒãžã®ãšã¯ã¹ããŒããªã©ïŒã ãã®ãã³ãã«èªäœã«ã¯ãã«ã¹ã¿ãã€ãºããã³ããŒãºã«åãããŠã«ã¹ã¿ãã€ãºããããã®éåžžã«æè»ãªãªãã·ã§ã³ããããŸãã
|
KnpMenuBundle | ã¡ãã¥ãŒãåçã«çæããããã®ãã³ãã«ãšã©ã€ãã©ãªã ã«ãŒãããã¹ãšããŠäœ¿çšããŸãã
|
KnpPaginatorBundle | ãµã€ãã®åçãªããŒãžããã²ãŒã·ã§ã³ãäœæããŸãã
|
FOSRestBundle | ãã®ãã³ãã«ã¯ãRESTful APIããã³ã¢ããªã±ãŒã·ã§ã³ã®è¿
éãªéçºã®ããã®ããŒã«ã»ãããæäŸããŸãã
|
SonataPageBundle | ãšã³ãã£ãã£ã«å¶åŸ¡ãæäŸããŸããµã€ãïŒããŒãžã®ã»ããïŒãããŒãžïŒãã³ãã«ã¯ããã€ãã®ã¿ã€ãã®ããŒãžãæäŸãããããã®ããŒãžã®CMSæ©èœãç°¡åã«ååŸã§ããŸãïŒããããã¯ïŒã³ã³ãã³ãã¯ãµãŒãã¹ã«ãã£ãŠç®¡çããããããã¯ã«ã¯ãµãŒãã¹IDãããŒãžäžã®äœçœ®ãããã³ããã€ãã®ãµãŒãã¹èšå®ãå«ãŸããŸãïŒããã£ãã·ã¥ïŒåãããã¯ã«å¯ŸããŠãã³ã³ãã³ãã«å¿ããŠããã£ãã·ã¥ãµãŒãã¹ããã€ã³ãã§ããŸãïŒ
|
SonataNewsBundle | Doctrine2ãšSymfony2ã«åºã¥ãããã°ãã©ãããã©ãŒã ã«ãããã«ãŒãã®å€èŠ³ãããã¹ãã®ãã©ãŒããããã³ã¡ã³ããå¶åŸ¡ã§ããŸã |
eã³ããŒã¹
| ååŒã«å¿
èŠãªããŸããŸãªãã³ãã«ãå«ãŸããŠããŸãã 補åãäŸ¡æ Œã顧客ããã¹ã±ãããé
éã泚æãæ¯æããè«æ±æž
|
Sonataãã£ãã·ã¥ãã£ãã·ã¥
| ä»ã®ãã£ãã·ã³ã°ãœãªã¥ãŒã·ã§ã³ãšã¯ç°ãªããæååããªããžã§ã¯ãèªäœã§ã¯ãªããäœããã®ããŒã¿ãå«ãé åããšã³ãã£ãã£åãšããŠäœ¿çšãããŸãã ããã¯ãšã³ãã®èåŸã«ã¯ããã®é åã®èå¥åãèšç®ããã¿ã¹ã¯ãæ¢ã«ãããŸãã èå³æ·±ããœãªã¥ãŒã·ã§ã³ã§ããã<a href= goal github.com/FriendsOfSymfony/FOSHttpCacheBundle> FOSHttpCacheBundle |
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
ç¹ã«åé¡ã¯ãããŸãããã¢ããªã±ãŒã·ã§ã³ã¯æ£åžžãªç¶æ ã«ç¶æãããŸãã
Knp radãããžã§ã¯ã
説æ
ãã®ãã³ãã«ã«ãããæšæºã¿ã¹ã¯ïŒã¡ãŒã«ã®éä¿¡ããã©ãã·ã¥ã¡ãã»ãŒãžããµãŒãã¹ã®èªåç»é²ããã©ãŒã ã®äœæïŒãå®è¡ããããã«å¿ èŠãªã³ãŒãã®éãå€§å¹ ã«åæžãããŸãã èŠã€ãããªããã¥ãŒãã³ãã¬ãŒããäœæããããã®ã¢ã·ã¹ã¿ã³ãããããŸãããã³ãã¬ãŒããèŠã€ãããªãã£ãå Žåã¯ããã©ãŠã¶ã§ãšã©ãŒããŒãžã®ãã©ãŒã ã«çŽæ¥äœæã§ããŸãã
æ¬ ç¹ã®äžã«ã¯ãå°ããªã³ãã¥ããã£ãšè¿œå ã®ç 究ã®å¿ èŠæ§ããããŸãã
ããã«ãSensioGeneratorBundleã¯ãBundleãControllerãCRUDãEntityãFormTypeã®çæã«ããŸã察å¿ããŠããŸãã ãŸãããã®ã³ãŒããKnpRadBundleã§é ããããããã®äœ¿çšæ¹æ³ã®ã»ããç解ããããã§ãã
[ Wikiãããžã§ã¯ã ]
èšçœ®
äœæ²å®¶ | $ composer create-project -s dev --prefer-dist --dev knplabs / rad-edition knprad_project
$ cd knprad_project |
---|
åºæ¬ãã³ãã«
ååãšç°¡åãªèª¬æãå«ãè¡š
Knpradbundle | ãã³ãã«èªäœãããã«ãããå€ãã®ã³ãŒããã«ããã§ããŸãïŒ äŸã§å€æããŸã ïŒ
|
---|---|
DoctrineFixturesBundle | ããŒã¿ããŒã¹ã®ãã£ã¯ã¹ãã£ã䜿çšããŸãã ããçš®ã®ãã¹ãæ
å ±ã絶ããçæããå¿
èŠãããéçºæ®µéã§ã®ç掻ã倧å¹
ã«ç°¡çŽ åããŸãã
|
MopaBootstrapBundle | twitterããŒãã¹ãã©ããããã䟿å©ã«äœ¿çšããããã®ãã³ãã¬ãŒããšæ¡åŒµæ©èœã®å°æ
|
Behat + ãã³ã¯ | ãã¹ãçšã®ãã³ãã«ã¯ãBDDïŒããã€ãã¢é§åéçºïŒã¢ãããŒããå®è£
ããŸãã
BehatBundleã®ä»£ããã«Symfony2Extensionã䜿çšããããšããå§ãããŸã |
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
åé¡ãããŸããã
Symfony2ããã°
説æ
Symfony SEã«åºã¥ããŠãã·ã³ãã«ãªããã°ãäœæãããŸãã ãœãŒã¹ãžã®ãªã³ã¯ã«ç¶ããŠãäœæããã»ã¹ã®æ®µéçãªèª¬æããããŸãããå°ããªããã°ãå®è£ ãããŠãããã¬ãŒã ã¯ãŒã¯ã®Sonataãµã³ãããã¯ã¹ã«çŠç¹ãåœãŠãæ¹ãè¯ãã§ãã Sonataãããžã§ã¯ããåžžã«ãã¢ãæŽæ°ããŠãããšããæå³ã§ã¯ãããè¯ãã§ãã
[ ãœãŒã¹ ]
èšçœ®
Git | $ git clone github.com/dsyph3r/symblog.git
$ cd symblog |
---|
åºæ¬ãã³ãã«
Symfony SEã§ã®ã¿äœ¿çšãããŸãã
ã¹ãã£ã³ã®åé¡ãçºçããŸãã
ãã®ã¬ãã¹ã³ã§ã¯ãSymfony2ã®å€ãããŒãžã§ã³ïŒ2.0.3ïŒãæ°å¹Žé䜿çšããŠããŸãã äœæ²å®¶ãã䜿çšããŠããŸãã