* symfonyの簡単なまとめ [#i6b39216]

** インストール [#jddf979f]
 pear channel-discover pear.symfony-project.com
 pear install symfony/symfony-1.2.10

** モジュールの追加 [#e241f351]
frontendアプリケーションにcontentモジュールを追加。
 cd PROJECT_DIR
 symfony generate:module frontend content

** アクションの追加 [#b9370f0f]
showアクションを追加。URLは http://localhost/frontend_dev.php/content/show になる。

● actions/actions.class.php
 <?php
 class contentActions extends sfActions
 {
   public function executeShow()
   {
      $this->mesg = 'SHOW!';
   }
 }

● content/templates/showSuccess.php
 <html>
 <body>
 <?php if ($mesg): ?>
 [<?php echo $mesg ?>]
 <?php endif; ?>
 </body>
 </html>

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS