{"id":202,"date":"2012-03-25T22:01:00","date_gmt":"2012-03-25T13:01:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=202"},"modified":"2012-03-25T22:01:00","modified_gmt":"2012-03-25T13:01:00","slug":"symfony","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2012\/03\/symfony\/","title":{"rendered":"symfony\u3067\u30d0\u30f3\u30c9\u30eb\u4f5c\u6210"},"content":{"rendered":"<p>Symfony\u3067\u30d0\u30f3\u30c9\u30eb\u3068\u304b\u3044\u3046\u306e\u3092\u4f5c\u308b\u3002\u4e00\u3064\u306e\u30a2\u30d7\u30ea\u3063\u3066\u611f\u3058\uff1f<br \/>\n\u3067\u3001PHP\u3092\u4f7f\u3063\u3066\u4f5c\u308b\u3089\u3057\u3044\u3002<br \/>\nSymfony\/app\/console generate:bundle [&#8211;namespace=&#8221;&#8230;&#8221;] [&#8211;dir=&#8221;&#8230;&#8221;] [&#8211;bundle-name=&#8221;&#8230;&#8221;] [&#8211;format=&#8221;&#8230;&#8221;] [&#8211;structure<\/p>\n<div>\u3068\u3044\u3046\u3053\u3068\u3067\u3001<\/div>\n<div>\nX:xamppphpphp X:xampphtdocsSymfonyappconsole generate:bundle &#8211;namespace=Acme\/HelloBundle &#8211;format=yml<br \/>\n\u3068\u5b9f\u884c\u3057\u3066\u3001\u30ea\u30bf\u30fc\u30f3\uff06\u30ea\u30bf\u30fc\u30f3\uff06\u30ea\u30bf\u30fc\u30f3!!<br \/>\n&nbsp; Welcome to the Symfony2 bundle generator<\/p>\n<p>Your application code must be written in bundles. This command helps you generate them easily.<\/p>\n<p>Each bundle is hosted under a namespace (like Acme\/Bundle\/BlogBundle).<br \/>\nThe namespace should begin with a &#8220;vendor&#8221; name like your company name, your project name, or your client name, followed by one or more optional category sub-namespaces, and it should end with the bundle name itself (which must have Bundle as a suffix).<\/p>\n<p>See http:\/\/symfony.com\/doc\/current\/cookbook\/bundles\/best_practices.html#index-1<br \/>\nfor more details on bundle naming conventions.<br \/>Use \/ instead of  for the namespace delimiter to avoid any problem.<\/p>\n<p>Bundle namespace [Acme\/HelloBundle]:<i>Acme\/HelloBundle<\/i><\/p>\n<p>In your code, a bundle is often referenced by its name. It can be the concatenation of all namespace parts but it&#8217;s really up to you to come up with a unique name (a good practice is to start with the vendor name).<br \/>\nBased on the namespace, we suggest AcmeHelloBundle.<\/p>\n<p>Bundle name [AcmeHelloBundle]:<i>AcmeHelloBundle<\/i><\/p>\n<p>The bundle can be generated anywhere. The suggested default directory uses the standard conventions.<\/p>\n<p>Target directory [X:xampphtdocsSymfony\/src]:<i>X:\/xampp\/htdocs\/Symfony\/src<\/i><\/p>\n<p>Determine the format to use for the generated configuration.<\/p>\n<p>Configuration format (yml, xml, php, or annotation) [yml]:<i>yml<\/i><\/p>\n<p>To help you getting started faster, the command can generate some code snippets for you.<\/p>\n<p>Do you want to generate the whole directory structure [no]? <i>yes<\/i><\/p>\n<p>\n&nbsp; Summary before generation<\/p>\n<p>\nYou are going to generate a &#8220;AcmeHelloBundleAcmeHelloBundle&#8221; bundle<br \/>\nin &#8220;X:xampphtdocsSymfony\/src\/&#8221; using the &#8220;yml&#8221; format.<\/p>\n<p>Do you confirm generation [yes]?<i>yes<\/i><\/p>\n<p>\n&nbsp; Bundle generation<\/p>\n<p>\nGenerating the bundle code: OK<br \/>\nChecking that the bundle is autoloaded: OK<br \/>\nConfirm automatic update of your Kernel [yes]? <i>yes<\/i><br \/>\nEnabling the bundle inside the Kernel: OK<br \/>\nConfirm automatic update of the Routing [yes]? <i>yes<\/i><br \/>\nImporting the bundle routing resource: OK<\/p>\n<p>\n&nbsp; You can now start using the generated code!\n<\/div>\n<p>\u3068\u3001\u4f55\u304b\u52dd\u624b\u306b\u30d5\u30a9\u30eb\u30c0\u304c\u4f5c\u6210\u3055\u308c\u3066\u3001<br \/>\nSymfony\/app\/src\/Acme\/HelloBundle<br \/>\n\u30d5\u30a1\u30a4\u30eb\u304c\u7de8\u96c6\u3055\u308c\u305f\u3002<br \/>\nSymfony\/app\/config\/routing.yml<br \/>\nAcmeHelloBundle:<br \/>\n&nbsp; resource: &#8220;@AcmeHelloBundle\/Resources\/config\/routing.yml&#8221;<br \/>\n&nbsp; prefix:   \/<br \/>\nSymfony\/app\/AppKernel.php<br \/>\nnew AcmeHelloBundleAcmeHelloBundle(),<\/p>\n<p>$bundles[] = new AcmeDemoBundleAcmeDemoBundle();<br \/>\n\u3055\u3066\u3068\u3001\u7406\u89e3\u3059\u308b\u304b\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Symfony\u3067\u30d0\u30f3\u30c9\u30eb\u3068\u304b\u3044\u3046\u306e\u3092\u4f5c\u308b\u3002\u4e00\u3064\u306e\u30a2\u30d7\u30ea\u3063\u3066\u611f\u3058\uff1f \u3067\u3001PHP\u3092\u4f7f\u3063\u3066\u4f5c\u308b\u3089\u3057\u3044\u3002 Symfony\/app\/console generate:bundle [&#8211;namespace=&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[130],"tags":[],"class_list":["post-202","post","type-post","status-publish","format-standard","hentry","category-130"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=202"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/202\/revisions"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}